Skip to content

Instantly share code, notes, and snippets.

@SergeGray
Created August 22, 2019 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SergeGray/c3f7a9ff60c5c1a4fcbbd95042fd3c54 to your computer and use it in GitHub Desktop.
Save SergeGray/c3f7a9ff60c5c1a4fcbbd95042fd3c54 to your computer and use it in GitHub Desktop.
HTTP requests
serge@EVO:~$ ncat -C httpbin.org 80
GET /anything?id=23&type=cool HTTP/1.1
Host: httpbin.org
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Type: application/json
Date: Thu, 22 Aug 2019 11:10:12 GMT
Referrer-Policy: no-referrer-when-downgrade
Server: nginx
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Content-Length: 287
Connection: keep-alive
{
"args": {
"id": "23",
"type": "cool"
},
"data": "",
"files": {},
"form": {},
"headers": {
"Host": "httpbin.org"
},
"json": null,
"method": "GET",
"origin": "-.-.-.-, -.-.-.-",
"url": "https://httpbin.org/anything?id=23&type=cool"
}
serge@EVO:~$ ncat -C httpbin.org 80
GET /anything HTTP/1.1
Host: httpbin.org
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Type: application/json
Date: Thu, 22 Aug 2019 11:05:28 GMT
Referrer-Policy: no-referrer-when-downgrade
Server: nginx
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Content-Length: 232
Connection: keep-alive
{
"args": {},
"data": "",
"files": {},
"form": {},
"headers": {
"Host": "httpbin.org"
},
"json": null,
"method": "GET",
"origin": "-.-.-.-, -.-.-.-",
"url": "https://httpbin.org/anything"
}
serge@EVO:~$ ncat -C httpbin.org 80
POST /anything?id=24&type=cool HTTP/1.1
Content-Length: 6
Host: httpbin.org
qwerty
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Type: application/json
Date: Thu, 22 Aug 2019 11:17:07 GMT
Referrer-Policy: no-referrer-when-downgrade
Server: nginx
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Content-Length: 322
Connection: keep-alive
{
"args": {
"id": "24",
"type": "cool"
},
"data": "qwerty",
"files": {},
"form": {},
"headers": {
"Content-Length": "6",
"Host": "httpbin.org"
},
"json": null,
"method": "POST",
"origin": "-.-.-.-, -.-.-.-",
"url": "https://httpbin.org/anything?id=24&type=cool"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment