Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

python http request post json example

>>> import requests
>>> r = requests.post('http://httpbin.org/post', json={"key": "value"})
>>> r.status_code
200
>>> r.json()
{'args': {},
 'data': '{"key": "value"}',
 'files': {},
 'form': {},
 'headers': {'Accept': '*/*',
             'Accept-Encoding': 'gzip, deflate',
             'Connection': 'close',
             'Content-Length': '16',
             'Content-Type': 'application/json',
             'Host': 'httpbin.org',
             'User-Agent': 'python-requests/2.4.3 CPython/3.4.0',
             'X-Request-Id': 'xx-xx-xx'},
 'json': {'key': 'value'},
 'origin': 'x.x.x.x',
 'url': 'http://httpbin.org/post'}
Comment

PREVIOUS NEXT
Code Example
Javascript :: place footer at the bottom of the page react 
Javascript :: prevent browser back button jquery 
Javascript :: match date regex 
Javascript :: javascript only allow show first few characters from a string 
Javascript :: how to set validation for email in javascript 
Javascript :: jquery trigger click other element 
Javascript :: chrome extension communication between popup and content script 
Javascript :: js get the week monday to friday date 
Javascript :: useHistory goback 
Javascript :: regular expression javascript for phone number 
Javascript :: arrow function forms in javascript 
Javascript :: H. Nazmul Hassan 
Javascript :: how to change react icon color 
Javascript :: calculate time difference in hrs moment 
Javascript :: javascript object to json 
Javascript :: sequelize logging insert 
Javascript :: unexpected token export type react bottontab navigation 
Javascript :: queryselector aria-label 
Javascript :: floating point in javascript 
Javascript :: how to create uuid in javascript 
Javascript :: javascript set localstorage 
Javascript :: adonis count with where 
Javascript :: option selected jquery 
Javascript :: redirect with javascript to another page 
Javascript :: replace node 
Javascript :: URL scheme "localhost" is not supported. 
Javascript :: javascript remove first space in string 
Javascript :: react native heroicons 
Javascript :: how to write img jsx 
Javascript :: drupal 8 get node from path alias 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =