これは便利
https://httpbin.org/
curlコマンドを叩くと
$ curl -X POST https://httpbin.org/post -d '{"foo":"bar"}' -H 'Content-Type: application/json'
こんなレスポンスが。便利。
{
"args": {},
"data": "{\"foo\":\"bar\"}",
"files": {},
"form": {},
"headers": {
"Accept": "*/*",
"Content-Length": "13",
"Content-Type": "application/json",
"Host": "httpbin.org",
"User-Agent": "curl/7.81.0",
"X-Amzn-Trace-Id": "Root=1-656fcff0-459921433a653138786d165d"
},
"json": {
"foo": "bar"
},
"origin": "220.146.199.239",
"url": "https://httpbin.org/post"
}
dockerコマンドでローカルにも建てられる。
$ docker run -p 80:80 kennethreitz/httpbin
参考
https://qiita.com/nassy20/items/753da223a7e86c914f56