百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
H

httpbun

> 测试质量
开源

一个带有用于测试 HTTP 客户端的 API 的 HTTP 服务器。受 httpbin 的启发,但不是其克隆。

183 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

一个带有用于测试 HTTP 客户端的 API 的 HTTP 服务器。受 httpbin 的启发,但不是其克隆。

Httpbun

This is an HTTP service with endpoints that are useful when testing any HTTP client, like a browser, a library, or any API developer tool. It's inspired by httpbin, but is so much more today.

Hosted at httpbun.com. Run your own with:

bash
docker run -p 80:80 sharat87/httpbun

To override the external redirect allowlist used by endpoints like /redirect-to, set HTTPBUN_ALLOWED_REDIRECT_DOMAINS to a comma- or whitespace-separated list such as example.com, httpbun.com, *.github.io.

A project by Shri.

:warning: If you are using this from your CI, please don't. Run a local version using the above Docker command, within your CI system, and use that "locally".

Building

There's a Taskfile.dist.yml included in the project, which is a Taskfile. Once you have task installed, running task run will start a local server from source. There's also:

  1. task build to build the binary
  2. task test to run tests
  3. task fmt to format code using a pinned, repo-local goimports
  4. task docker to build binaries for building Docker image

We patch Go's standard lib a little. There's a line in net/http/server.go that delets the Host header in all incoming requests. We comment that line out during build, and uncomment it again to restore it.

So, if you're using the same Go installation for this and other projects at the same time, you may see unexpected behaviour.

The patching and unpatching is in task patch and task unpatch targets.

Contributing

Bug fixes, yes. New features, less so please. Either way, consider opening an issue to discuss it before you start working. This will ensure we are on the same page and your work would be in the right place to be merged in. It'll also ensure we don't end up working on the same thing, duplicating efforts. Thanks!

New features are added mostly as I need them, and in the form that I want to use them.

License

Apache-2.0 License. Project includes a NOTICE file.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Goapihttphttp-serverhttp-test

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类测试质量
定价开源

> 相关工具

J
Jest
JavaScript 测试框架
P
Playwright
现代端到端测试框架
E
eslint-plugin-test-selectors
Enforces that data-test-id attributes are added to interactive DOM elements (JSX) to help with UI testing. JSX only.