-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequests-post-example.json
More file actions
39 lines (39 loc) · 1.13 KB
/
requests-post-example.json
File metadata and controls
39 lines (39 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
"_comment": "Python Requests: r = requests.post('https://httpbin.org/post', json={'name': 'Alice'}, headers={'Authorization': 'Bearer token123'}, timeout=15)",
"request": {
"@context": "https://raw.githubusercontent.com/api-evangelist/requests/refs/heads/main/json-ld/requests-context.jsonld",
"@type": "HTTPRequest",
"method": "POST",
"url": "https://httpbin.org/post",
"headers": {
"Authorization": "Bearer token123",
"Content-Type": "application/json"
},
"json": {
"name": "Alice",
"email": "alice@example.com"
},
"timeout": 15,
"verify": true
},
"response": {
"@context": "https://raw.githubusercontent.com/api-evangelist/requests/refs/heads/main/json-ld/requests-context.jsonld",
"@type": "HTTPResponse",
"status_code": 200,
"ok": true,
"reason": "OK",
"url": "https://httpbin.org/post",
"headers": {
"Content-Type": "application/json"
},
"encoding": "utf-8",
"elapsed": 0.187,
"json_body": {
"json": {
"name": "Alice",
"email": "alice@example.com"
},
"url": "https://httpbin.org/post"
}
}
}