接受GET / Post调用的HTTP测试服务器 [英] HTTP Test server that accepts GET/Post calls
本文介绍了接受GET / Post调用的HTTP测试服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要一个实时测试服务器,它通过HTTP GET接受我对基本信息的请求,并允许我POST(即使它真的没有做任何事情)。这完全是出于测试目的。
一个很好的例子是这里
它很容易接受GET请求,但我需要一个接受POST请求。
<有没有人知道我可以发送愚蠢的测试消息的服务器?
解决方案
它回应了您的请求中使用的任何类型的数据:
- http://httpbin.org/ip 返回来源IP。
- http://httpbin.org/user-agent 返回用户 - 代理。
- http://httpbin.org/headers 返回标题字典。
- http://httpbin.org/get 返回GET数据。
- http://httpbin.org/post 返回POST数据。
- http://httpbin.org/put 返回PUT数据。
- http://httpbin.org/delete 返回DELETE数据
- http://httpbin.org/gzip 返回gzip编码数据。
- http://httpbin.org/status/:code 返回给定的HTTP状态代码。
- http://httpbin.org/response-headers?key=val 返回给定的回复标题。
- http://httpbin.org/redirect/:n 302重定向n次。
- http://httpbin.org/relative-redirect/:n 302相对重定向n次。
- http://httpbin.org/cookies 返回cookie数据。
- http://httpbin.org/cookies/set/:name/:value 设置一个简单的cookie。
- http://httpbin.org/basic-auth/:user/:passwd 挑战HTTPBasic Auth。
- http://httpbin.org/hidden-basic-auth/:user/:passwd 404'd BasicAuth。
- http:// httpbin .org / digest-auth /:qop /:user /:passwd 挑战HTTP摘要验证。
- http://httpbin.org/stream/:n Streams n-100行。
- http://httpbin.org/delay/:n 延迟响应n-10秒。
I need a live test server that accepts my requests for basic information via HTTP GET and also allows me to POST (even if its really not doing anything). This is entirely for test purposes.
A good example is here
it easily accepts GET requests, but I need one that accepts POST requests.
Does anyone know of a server that I can send stupid test messages too?
解决方案
It echoes the data used in your request for any of these types:
- http://httpbin.org/ip Returns Origin IP.
- http://httpbin.org/user-agent Returns user-agent.
- http://httpbin.org/headers Returns header dict.
- http://httpbin.org/get Returns GET data.
- http://httpbin.org/post Returns POST data.
- http://httpbin.org/put Returns PUT data.
- http://httpbin.org/delete Returns DELETE data
- http://httpbin.org/gzip Returns gzip-encoded data.
- http://httpbin.org/status/:code Returns given HTTP Status code.
- http://httpbin.org/response-headers?key=val Returns given response headers.
- http://httpbin.org/redirect/:n 302 Redirects n times.
- http://httpbin.org/relative-redirect/:n 302 Relative redirects n times.
- http://httpbin.org/cookies Returns cookie data.
- http://httpbin.org/cookies/set/:name/:value Sets a simple cookie.
- http://httpbin.org/basic-auth/:user/:passwd Challenges HTTPBasic Auth.
- http://httpbin.org/hidden-basic-auth/:user/:passwd 404'd BasicAuth.
- http://httpbin.org/digest-auth/:qop/:user/:passwd Challenges HTTP Digest Auth.
- http://httpbin.org/stream/:n Streams n–100 lines.
- http://httpbin.org/delay/:n Delays responding for n–10 seconds.
这篇关于接受GET / Post调用的HTTP测试服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文