@defer.inlineCallbacks<EOL><INDENT>def getJson(self, url, method='<STR_LIT:GET>', headers={}, data=None, socket=None):<DEDENT>
if not '<STR_LIT:Content-Type>' in headers:<EOL><INDENT>headers['<STR_LIT:Content-Type>'] = ['<STR_LIT:application/json>']<EOL><DEDENT>body = yield self.getBody(url, method, headers, data, socket)<EOL>defer.returnValue(json.loads(body))<EOL>
Fetch a JSON result via HTTP