Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sharat87/httpbun
An HTTP server with APIs useful in testing HTTP clients. Inspired by httpbin, but isn't a clone.
https://github.com/sharat87/httpbun
api http http-server http-test http-testing http-testing-server httpbin json json-server service
Last synced: 4 days ago
JSON representation
An HTTP server with APIs useful in testing HTTP clients. Inspired by httpbin, but isn't a clone.
- Host: GitHub
- URL: https://github.com/sharat87/httpbun
- Owner: sharat87
- License: apache-2.0
- Created: 2021-05-01T07:59:41.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-11-30T06:14:38.000Z (about 1 month ago)
- Last Synced: 2024-12-23T02:07:12.777Z (11 days ago)
- Topics: api, http, http-server, http-test, http-testing, http-testing-server, httpbin, json, json-server, service
- Language: Go
- Homepage: https://httpbun.com
- Size: 3.97 MB
- Stars: 95
- Watchers: 3
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
HttpbunThis 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 heavily inspired by [httpbin](https://httpbin.org).Hosted at [httpbun.com](https://httpbun.com). Run your own with:
```sh
docker run -p 80:80 sharat87/httpbun
```A project by [Shri](https://sharats.me).
## Building
There's a `Taskfile.dist.yml` included in the project, which is a [Taskfile](https://taskfile.dev). 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
4. `task docker` to build binaries for building Docker imageWe 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
Contributions to httpbun are welcome, for the most part. However, I strongly urge you to open an issue to discuss
whatever you're working to contribute *before* you start working on it. 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!## Plug
If you are interested in API testing and API development, you should check [Prestige](https://prestige.dev) out. It is a text based API testing tool with Javascript templating support. It's also open source at [sharat87/prestige](https://github.com/sharat87/prestige).
## License
[Apache-2.0 License](https://github.com/sharat87/httpbun/blob/master/LICENSE). Project includes a
[NOTICE](https://github.com/sharat87/httpbun/blob/master/NOTICE) file.