httpbin
httpbin copied to clipboard
feat(response-headers): allow custom body
It'd be helpful to have a way to define the response body when setting headers via the /respons-headers endpoint.
This may be solved by allowing to send headers or form-data rather than query args
http -f post :8000/response-headers X-Foo==Foo # <- send as query args
HTTP/1.1 200 OK
X-Foo: bar
{
"Content-Length": "87",
"Content-Type": "application/json",
"X-Foo": "Foo"
}
Could be:
http -f post :8000/response-headers X-Foo:Foo # <- send as header
HTTP/1.1 200 OK
X-Foo: bar
{
"Content-Length": "87",
"Content-Type": "application/json",
// no extra body element
}