"""
Example of requests with json as body
"""
import requests
import json

r = requests.post(
    url='http://httpbin.org/post',
    params={'my-param-name': 'param-value'},
    headers={'my-header-name': 'header-value'},
    json=json.dumps({'some': 'value'})
)

print('STATUS CODE: ', r.status_code)
print()
print('REASON: ', r.reason)
print()
print('CONTENT: ', r.content)
print()
print('TEXT: ', r.text)
print()
print('JSON: ', r.json())
print()
print('JSON TYPE: ', r.json().__class__.__name__)

89f8973d015bebf02681f0cb8a09743e212e19d4
<mask token>

<mask token>
print('STATUS CODE: ', r.status_code)
print()
print('REASON: ', r.reason)
print()
print('CONTENT: ', r.content)
print()
print('TEXT: ', r.text)
print()
print('JSON: ', r.json())
print()
print('JSON TYPE: ', r.json().__class__.__name__)

<mask token>
r = requests.post(url='http://httpbin.org/post', params={'my-param-name':
    'param-value'}, headers={'my-header-name': 'header-value'}, json=json.
    dumps({'some': 'value'}))
print('STATUS CODE: ', r.status_code)
print()
print('REASON: ', r.reason)
print()
print('CONTENT: ', r.content)
print()
print('TEXT: ', r.text)
print()
print('JSON: ', r.json())
print()
print('JSON TYPE: ', r.json().__class__.__name__)

<mask token>
import requests
import json
r = requests.post(url='http://httpbin.org/post', params={'my-param-name':
    'param-value'}, headers={'my-header-name': 'header-value'}, json=json.
    dumps({'some': 'value'}))
print('STATUS CODE: ', r.status_code)
print()
print('REASON: ', r.reason)
print()
print('CONTENT: ', r.content)
print()
print('TEXT: ', r.text)
print()
print('JSON: ', r.json())
print()
print('JSON TYPE: ', r.json().__class__.__name__)

"""
Example of requests with json as body
"""
import requests
import json

r = requests.post(
    url='http://httpbin.org/post',
    params={'my-param-name': 'param-value'},
    headers={'my-header-name': 'header-value'},
    json=json.dumps({'some': 'value'})
)

print('STATUS CODE: ', r.status_code)
print()
print('REASON: ', r.reason)
print()
print('CONTENT: ', r.content)
print()
print('TEXT: ', r.text)
print()
print('JSON: ', r.json())
print()
print('JSON TYPE: ', r.json().__class__.__name__)
