从:
Alamofire/Alamofire: Elegant HTTP Networking in Swift
-》
-》返回对应的json
{
“args”: {},
“headers”: {
“Accept”: “text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8”,
“Accept-Encoding”: “gzip, deflate”,
“Accept-Language”: “zh-cn”,
“Connection”: “close”,
“Cookie”: “_gauges_unique=1; _gauges_unique_year=1”,
“Host”: “httpbin.org“,
“User-Agent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.3.5 (KHTML, like Gecko) Version/11.0.1 Safari/604.3.5”
},
“origin”: “180.117.243.209”,
“url”: “https://httpbin.org/get”;
}
httpbin(1): HTTP Client Testing Service
-》
提供各种返回的内容的示例
httpbin:测试 HTTP 请求及响应的网站 – 资源 – 伯乐在线
github
kennethreitz/httpbin: HTTP Request & Response Service, written in Python + Flask.
-》
网站:
httpbin(1): HTTP Client Testing Service
https的:
httpbin(1): HTTP Client Testing Service
比如:
终端中的curl:
Last login: Thu Oct 12 15:38:16 on ttys003
➜ ~ curl http://httpbin.org/user-agent
{
“user-agent”: “curl/7.54.0”
}
浏览器中:
{
“user-agent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.3.2 (KHTML, like Gecko) Version/11.0.1 Safari/604.3.2”
}
转载请注明:在路上 » 【整理】Httpbin免费提供HTTP请求和响应的测试网站