Skip to content

Instantly share code, notes, and snippets.

@Codcore
Created February 21, 2019 11:45
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 Codcore/a484887959bad18b8d187ffb32cef1fd to your computer and use it in GitHub Desktop.
Save Codcore/a484887959bad18b8d187ffb32cef1fd to your computer and use it in GitHub Desktop.
HTTP
rubycoder@shehinacode ~ $ ncat -C httpbin.org 80 [ruby-2.6.0]
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, 21 Feb 2019 11:16:58 GMT
Server: nginx
Content-Length: 230
Connection: keep-alive
{
"args": {},
"data": "",
"files": {},
"form": {},
"headers": {
"Host": "httpbin.org"
},
"json": null,
"method": "GET",
"origin": "46.96.24.17, 46.96.24.17",
"url": "https://httpbin.org/anything"
}
rubycoder@shehinacode ~ $ ncat -C httpbin.org 80 [ruby-2.6.0]
GET /anything?lang=ru&page=6 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, 21 Feb 2019 11:27:16 GMT
Server: nginx
Content-Length: 283
Connection: keep-alive
{
"args": {
"lang": "ru",
"page": "6"
},
"data": "",
"files": {},
"form": {},
"headers": {
"Host": "httpbin.org"
},
"json": null,
"method": "GET",
"origin": "46.96.24.17, 46.96.24.17",
"url": "https://httpbin.org/anything?lang=ru&page=6"
}
rubycoder@shehinacode ~ $ ncat -C httpbin.org 80 [ruby-2.6.0]
POST /anything HTTP/1.1
Host: httpbin.org
Content-length: 15
log=And&pass=45
HTTP/1.1 400 BAD_REQUEST
Content-Length: 0
Connection: Close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment