Skip to content

Commit

Permalink
Merge pull request #3 from Birne94/request-data
Browse files Browse the repository at this point in the history
Add support for non-json request data
  • Loading branch information
benhowes authored Feb 3, 2019
2 parents 08231cf + b987514 commit 1110e53
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tavern_flask/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
import json as jsonlib

try:
from urllib.parse import urlparse
from urllib.parse import urlparse, urlencode
except ImportError:
from urlparse import urlparse
from urllib import urlencode

from future.utils import raise_from

Expand Down Expand Up @@ -57,7 +58,7 @@ def make_request(self, url, verify, method, headers=None, params=None, json=None
body = None

if data:
raise NotImplementedError
body = urlencode(data)

if json:
body = jsonlib.dumps(json)
Expand Down

0 comments on commit 1110e53

Please sign in to comment.