Commit d81f103b authored by ayllon's avatar ayllon
Browse files

Specify text/json content-type on POST

parent 851820b6
......@@ -116,5 +116,8 @@ class Context(object):
def delete(self, path):
return self._requester.method('DELETE', "%s/%s" % (self.endpoint, path))
def post(self, path, body):
return self._requester.method('POST', "%s/%s" % (self.endpoint, path), body)
def post_json(self, path, body):
return self._requester.method('POST', "%s/%s" % (self.endpoint, path),
body, headers = {'Content-Type': 'text/json'})
......@@ -37,7 +37,7 @@ class Submitter(object):
def submit(self, source, destination, **kwargs):
job = self.buildSubmission(source, destination, **kwargs)
r = json.loads(self.context.post('/jobs', job))
r = json.loads(self.context.post_json('/jobs', job))
return r['job_id']
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment