To start here is some code:
import requests
import json
url = r'http:\\some.url'
p = requests.post(url)
print p.status_code
data = json.load(p)
for entry in data:
print entry
print data
The output of this program is as follows (note values are sanitized):
200
a
{"a":"b"}
Is there a way to get value “b” applied to a variable? Since the post will always return {“a”:”b”}, I don’t really care what “a” is, since it is basically a constant.
Assuming Python 2.x: