go-httpbin(1)

A golang port of the venerable httpbin.org HTTP request & response testing service.

ENDPOINTS

DESCRIPTION

Testing an HTTP Library can become difficult sometimes. RequestBin is fantastic for testing POST requests, but doesn't let you control the response. This exists to cover all kinds of HTTP scenarios. Additional endpoints are being considered.

All endpoint responses are JSON-encoded.

EXAMPLES

$ curl https://httpbingo.org/ip

{"origin":"73.238.9.52, 77.83.142.42"}

$ curl https://httpbingo.org/user-agent

{"user-agent":"curl/7.64.1"}

$ curl https://httpbingo.org/get?foo=bar

{
  "args": {
    "foo": [
      "bar"
    ]
  },
  "headers": {
    "Accept": [
      "*/*"
    ],
    "Host": [
      "httpbingo.org"
    ],
    "User-Agent": [
      "curl/7.64.1"
    ]
  },
  "origin": "73.238.9.52, 77.83.142.42",
  "url": "https://httpbingo.org/get?foo=bar"
}

$ curl https://httpbingo.org/dump/request?foo=bar

GET /dump/request?foo=bar HTTP/1.1
Host: httpbingo.org
Accept: */*
User-Agent: curl/7.64.1

$ curl -I https://httpbingo.org/status/418

HTTP/1.1 418 I'm a teapot
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
X-More-Info: http://tools.ietf.org/html/rfc2324
Date: Tue, 13 Jul 2021 13:12:37 GMT
Content-Length: 0

AUTHOR

Ported to Go by Will McCutchen.

From the original Kenneth Reitz project.

SEE ALSO

httpbin.org — the original httpbin

Fork me on GitHub