python POST request and null value
<p>I'm using the following code , to do POST request on application level </p>

<pre><code>url = 'http://www.webdev.com/web/POST'
headers = {'content-type': 'application/json'}
payload = {'name': 'name', 'status': 'success', 'newname': 'name'}
r = requests.post(url, data=json.dumps(payload), headers=headers)
r.text
r.status_code
r.connection.close()
</code></pre>

<p>from Python logs </p>

<pre><code>send: 'POST /web/POST HTTP/1.1\r\nHost: www.webdev.com\r\nContent-Length: 189\r\nUser-Agent: python-requests/2.8.1\r\nConnection: keep-alive\r\nAccept: */*\r\nAccept-Encoding: gzip, deflate\r\n\r\n'
send: '{"name": "test1", "status": "sucsses", "newname": "name23"}'
reply: 'HTTP/1.1 200 OK\r\n'
</code></pre>

<p>but on the application level, it gives null value for the 3 vars.</p>

<p>The application is expecting the following format:</p>

<pre><code>http://www.webdev.com/web/POST?name=test1&amp;status=sucsses&amp;newname=name23
</code></pre>

<p>I used curl command to do the post and application got the right value</p>