Closed twm closed 4 years ago
The current example could use the json shorthand:
def main(reactor, *args): d = treq.post('https://httpbin.org/post', json.dumps({"msg": "Hello!"}).encode('ascii'), headers={b'Content-Type': [b'application/json']}) d.addCallback(print_response) return d
We should certainly have an example of data, but putting this particular example on the homepage implies that json doesn't exist.
The current example could use the json shorthand:
We should certainly have an example of data, but putting this particular example on the homepage implies that json doesn't exist.