Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save darkcolonist/042053d35a6fb2294afd79ca85c01b87 to your computer and use it in GitHub Desktop.
Save darkcolonist/042053d35a6fb2294afd79ca85c01b87 to your computer and use it in GitHub Desktop.
sample json post data
requests.post('https://jsonplaceholder.typicode.com/posts',
headers={"content-type":"application/json"},
json={
"keyyy-nervate" :"valll-retroactive" ,
"keyyy-polypody" :"valll-ladakin" ,
"keyyy-unremonstrant" :"valll-unmetropolitan" ,
"keyyy-exoticism" :"valll-monarchy" ,
}
)
201 Created
0.970165s, 180B
https://jsonplaceholder.typicode.com/posts
Request Headers: {'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'python-requests/2.18.3', 'Connection': 'keep-alive', 'content-type': 'application/json', 'Content-Length': '157'}
Response Cookies: {'__cfduid': 'de14be9961db7a9c0278f48e11082cd931599115026'}
[ctrl+r] replay request, [ctrl+alt+ ←/→] prev/next request, [ctrl+t] pin/unpin tab, [ctrl+s] save request, [ctrl+e] explore URL
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Location
CF-Cache-Status: DYNAMIC
CF-RAY: 5ccd75d53c0ac39f-SIN
Cache-Control: no-cache
Connection: keep-alive
Content-Length: 180
Content-Type: application/json; charset=utf-8
Date: Thu, 03 Sep 2020 06:37:07 GMT
Etag: W/"b4-SZREyENgKUQ2rovAQKJAme0o3Ac"
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Expires: -1
Location: http://jsonplaceholder.typicode.com/posts/101
Pragma: no-cache
Server: cloudflare
Set-Cookie: __cfduid=de14be9961db7a9c0278f48e11082cd931599115026; expires=Sat, 03-Oct-20 06:37:06 GMT; path=/; domain=.typicode.com; HttpOnly; SameSite=Lax
Vary: Origin, X-HTTP-Method-Override, Accept-Encoding
Via: 1.1 vegur
X-Content-Type-Options: nosniff
X-Powered-By: Express
X-Ratelimit-Limit: 1000
X-Ratelimit-Remaining: 999
X-Ratelimit-Reset: 1599115087
cf-request-id: 04f447f93f0000c39fab8bd200000001
{
"id": 101,
"keyyy-exoticism": "valll-monarchy",
"keyyy-nervate": "valll-retroactive",
"keyyy-polypody": "valll-ladakin",
"keyyy-unremonstrant": "valll-unmetropolitan"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment