Skip to content
This repository was archived by the owner on Aug 29, 2019. It is now read-only.

Commit df9697d

Browse files
committed
Updated OAuth adapter to not use empty body
1 parent d1e566e commit df9697d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aweber_api/oauth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def request(self, method, url, data={}, response='body'):
2727
try:
2828
# need a test for the next 4 lines below
2929
content_type = 'application/json'
30-
if method == 'GET' and body is not None:
30+
if method == 'GET' and body is not None and body is not '':
3131
# todo: need a better way to do this!
3232
url = '{0}?{1}'.format(url, body)
3333
if method == 'POST':
@@ -61,7 +61,7 @@ def _get_client(self):
6161
def _prepare_request_body(self, method, url, data):
6262
# might need a test for the changes to this method
6363
if method not in ['POST', 'GET', 'PATCH'] or len(data.keys()) == 0:
64-
return None
64+
return ''
6565
if method in ['POST', 'GET']:
6666
return urlencode(data)
6767
if method == 'PATCH':

0 commit comments

Comments
 (0)