Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Commit

Permalink
Include the fix for authorizing HTTP requests in the older datalab
Browse files Browse the repository at this point in the history
…module
  • Loading branch information
ojarjur committed Mar 10, 2017
1 parent 50b541e commit 732f5dd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion datalab/utils/_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from past.builtins import basestring
from builtins import object

import copy
import datetime
import json
import urllib.request, urllib.parse, urllib.error
Expand Down Expand Up @@ -119,9 +120,12 @@ def request(url, args=None, data=None, headers=None, method=None,
if method is None:
method = 'GET'

# Authorize with credentials if given.
http = Http.http

# Authorize with credentials if given.
if credentials is not None:
# Make a copy of the shared http instance before we modify it.
http = copy.copy(http)
http = credentials.authorize(http)
if stats is not None:
stats['duration'] = datetime.datetime.utcnow()
Expand Down

0 comments on commit 732f5dd

Please sign in to comment.