接受 GET/POST 请求的 HTTP 测试服务器 [英] HTTP test server accepting GET/POST requests

查看:57
本文介绍了接受 GET/POST 请求的 HTTP 测试服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个实时测试服务器,它可以通过 HTTP GET 接受我对基本信息的请求,还允许我进行 POST(即使它真的什么也没做).这完全是为了测试目的.

I need a live test server that accepts my requests for basic information via HTTP GET and also allows me to POST (even if it's really not doing anything). This is entirely for test purposes.

一个很好的例子是这里.它很容易接受 GET 请求,但我需要一个也接受 POST 请求的请求.

A good example is here. It easily accepts GET requests, but I need one that accepts POST requests as well.

有人知道我也可以发送虚拟测试消息的服务器吗?

Does anyone know of a server that I can send dummy test messages too?

推荐答案

https://httpbin.org/

它回显您的请求中使用的任何这些类型的数据:

It echoes the data used in your request for any of these types:

  • https://httpbin.org/anything Returns most of the below.
  • https://httpbin.org/ip Returns Origin IP.
  • https://httpbin.org/user-agent Returns user-agent.
  • https://httpbin.org/headers Returns header dict.
  • https://httpbin.org/get Returns GET data.
  • https://httpbin.org/post Returns POST data.
  • https://httpbin.org/put Returns PUT data.
  • https://httpbin.org/delete Returns DELETE data
  • https://httpbin.org/gzip Returns gzip-encoded data.
  • https://httpbin.org/status/:code Returns given HTTP Status code.
  • https://httpbin.org/response-headers?key=val Returns given response headers.
  • https://httpbin.org/redirect/:n 302 Redirects n times.
  • https://httpbin.org/relative-redirect/:n 302 Relative redirects n times.
  • https://httpbin.org/cookies Returns cookie data.
  • https://httpbin.org/cookies/set/:name/:value Sets a simple cookie.
  • https://httpbin.org/basic-auth/:user/:passwd Challenges HTTPBasic Auth.
  • https://httpbin.org/hidden-basic-auth/:user/:passwd 404'd BasicAuth.
  • https://httpbin.org/digest-auth/:qop/:user/:passwd Challenges HTTP Digest Auth.
  • https://httpbin.org/stream/:n Streams n–100 lines.
  • https://httpbin.org/delay/:n Delays responding for n–10 seconds.

这篇关于接受 GET/POST 请求的 HTTP 测试服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆