Skip to content

Commit

Permalink
Add support for non-json request data
Browse files Browse the repository at this point in the history
  • Loading branch information
Birne94 committed Aug 13, 2018
1 parent 08231cf commit b987514
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 b987514

Please sign in to comment.