1. Сформируйте и отправьте по указанному выше url:
1.1 GET запрос без параметров
~|⇒ ncat -C httpbin.org 80
GET /anything HTTP/1.1
Host: httpbin.org
HTTP/1.1 200 OK
Connection: keep-alive
Server: gunicorn/19.9.0
Date: Fri, 05 Oct 2018 20:38:41 GMT
Content-Type: application/json
Content-Length: 246
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Via: 1.1 vegur
{
"args": {},
"data": "",
"files": {},
"form": {},
"headers": {
"Connection": "close",
"Host": "httpbin.org"
},
"json": null,
"method": "GET",
"origin": "***.***.***.***",
"url": "http://httpbin.org/anything"
}
1.2 GET запрос с любыми параметрами строки URL
~|⇒ ncat -C httpbin.org 80
GET /anything?name=origin HTTP/1.1
Host: httpbin.org
HTTP/1.1 200 OK
Connection: keep-alive
Server: gunicorn/19.9.0
Date: Fri, 05 Oct 2018 20:49:03 GMT
Content-Type: application/json
Content-Length: 282
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Via: 1.1 vegur
{
"args": {
"name": "origin"
},
"data": "",
"files": {},
"form": {},
"headers": {
"Connection": "close",
"Host": "httpbin.org"
},
"json": null,
"method": "GET",
"origin": "***.***.***.***",
"url": "http://httpbin.org/anything?name=origin"
}
1.3 POST запрос с любыми параметрами
~|⇒ ncat -C httpbin.org 80
POST /anything HTTP/1.1
Host: httpbin.org
Content-length: 29
name=aristotel&message=yoman
HTTP/1.1 200 OK
Connection: keep-alive
Server: gunicorn/19.9.0
Date: Fri, 05 Oct 2018 21:23:14 GMT
Content-Type: application/json
Content-Length: 306
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Via: 1.1 vegur
{
"args": {},
"data": "name=aristotel&message=yoman\r",
"files": {},
"form": {},
"headers": {
"Connection": "close",
"Content-Length": "29",
"Host": "httpbin.org"
},
"json": null,
"method": "POST",
"origin": "***.***.***.***",
"url": "http://httpbin.org/anything"
}
HTTP/1.1 400 Bad Request
Connection: close
Server: Cowboy
Date: Fri, 05 Oct 2018 21:23:13 GMT
Content-Length: 0