Skip to content

Commit

Permalink
Fix upload doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Leitsius committed Nov 12, 2015
1 parent 08867bd commit 6fc762c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions openprocurement_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
from iso8601 import parse_date
from munch import munchify
from restkit import BasicAuth, Resource, request, errors
from retrying import retry
from simplejson import dumps, loads
from tempfile import NamedTemporaryFile
from urlparse import parse_qs, urlparse
import sys
from retrying import retry

IGNORE_PARAMS = ('uri', 'path',)

Expand Down Expand Up @@ -44,14 +44,13 @@ def __init__(self, key,
self.params = {"mode": "_all_"}
self.headers = {"Content-Type": "application/json"}

def request(self, method, path=None, payload=None, headers=None,
def request(self, method, path=None, payload=None, headers={},
params_dict=None, **params):
if not headers:
headers = {}
headers.update(self.headers)
_headers = dict(self.headers)
_headers.update(headers)
try:
response = super(Client, self).request(
method, path=path, payload=payload, headers=headers,
method, path=path, payload=payload, headers=_headers,
params_dict=params_dict, **params
)
if 'Set-Cookie' in response.headers:
Expand Down

0 comments on commit 6fc762c

Please sign in to comment.