freeapis

Httpbin

一个简单的 HTTP 请求与响应服务

认证方式
No auth
HTTPS
Yes
CORS
Yes
分类
开发

简介

httpbin 是 HTTP 请求与响应测试服务——把请求回显给你,测试认证头、重定向、延迟、状态码等。免密钥、支持 CORS(实测可用),是测试 HTTP 客户端、代理和 webhook 的事实标准工具。

快速开始

回显请求(实测可用):

curl "https://httpbin.org/get"
{
  "args": {},
  "headers": { "Accept": "*/*", "User-Agent": "curl/8.14.1" },
  "origin": "210.61.187.110",
  "url": "https://httpbin.org/get"
}

检查 POST:

curl -X POST "https://httpbin.org/post" -d 'hello=world'

测试状态码:

curl -o /dev/null -w '%{http_code}' "https://httpbin.org/status/418"   # I'm a teapot

测试重定向:

curl -sI "https://httpbin.org/redirect/3"

延迟/慢响应:

curl "https://httpbin.org/delay/2"

认证方式

无需认证——免密钥(/basic-auth/{user}/{pass}/bearer 帮你测试认证客户端)。

速率限制与注意事项

  • 免费,没有文档化的硬性限制——请礼貌使用(公共测试服务)。
  • 实用端点:/get/post/status/{code}/redirect/{n}/delay/{s}/headers/ip/user-agent/response-headers/bytes/{n}
  • 已启用 CORS——非常适合浏览器端 fetch 测试。
  • 也可 Docker 本地运行(kennethreitz/httpbin)。

常见问题

httpbin 免费吗? 是的——免费且免密钥。

如何测试 webhook? 把 webhook 指向 httpbin,用 /anything/post 捕获载荷。

可以本地运行吗? 可以——docker run -p 8000:8000 kennethreitz/httpbin

开发 分类更多

APIAuthHTTPSCORS
24 Pull Requests

Project to promote open source collaboration during December

No authYesYes
Agify.io

Estimates the age from a first name

No authYesYes
Amazonscraperapi

Amazon product, search & batch scraping API with residential proxies (1000 free)

API KeyYesNo
AmberOne

Turn any website into a build-ready Android, iOS, PWA or Electron app project

API KeyYesNo
API Grátis

Multiples services and public APIs

No authYesUnknown