Httpbin

httpbin.org

A simple HTTP Request & Response Service. Run locally: $ docker run -p 80:80 kennethreitz/httpbin

Developer tools#openapi#developer-tools

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

A simple HTTP Request & Response Service. Run locally: $ docker run -p 80:80 kennethreitz/httpbin

Endpoints 78

HTTP Methods

  • DELETEThe request's DELETE parameters./delete
  • GETThe request's query parameters./get
  • PATCHThe request's PATCH parameters./patch
  • POSTThe request's POST parameters./post
  • PUTThe request's PUT parameters./put

Auth

  • GETPrompts the user for authorization using HTTP Basic Auth./basic-auth/:user/:passwd
  • GETPrompts the user for authorization using bearer authentication./bearer
  • GETPrompts the user for authorization using Digest Auth./digest-auth/:qop/:user/:passwd
  • GETPrompts the user for authorization using Digest Auth + Algorithm./digest-auth/:qop/:user/:passwd/:algorithm
  • GETPrompts the user for authorization using Digest Auth + Algorithm./digest-auth/:qop/:user/:passwd/:algorithm/:stale_afterallow settings the stale_after argument.
  • GETPrompts the user for authorization using HTTP Basic Auth./hidden-basic-auth/:user/:passwd

Status codes

  • GETReturn status code or random status code if more than one are given/status/:codes
  • PUTReturn status code or random status code if more than one are given/status/:codes
  • POSTReturn status code or random status code if more than one are given/status/:codes
  • DELETEReturn status code or random status code if more than one are given/status/:codes
  • PATCHReturn status code or random status code if more than one are given/status/:codes
  • TRACEReturn status code or random status code if more than one are given/status/:codes

Request inspection

  • GETReturn the incoming request's HTTP headers./headers
  • GETReturns the requester's IP Address./ip
  • GETReturn the incoming requests's User-Agent header./user-agent

Response inspection

  • GETReturns a 304 if an If-Modified-Since header or If-None-Match is present. Returns the same as a GET otherwise./cache
  • GETSets a Cache-Control header for n seconds./cache/:value
  • GETAssumes the resource has the given etag and responds to If-None-Match and If-Match headers appropriately./etag/:etag
  • GETReturns a set of response headers from the query string./response-headers?freeform=string
  • POSTReturns a set of response headers from the query string./response-headers?freeform=string

Response formats

  • GETReturns Brotli-encoded data./brotli
  • GETReturns Deflate-encoded data./deflate
  • GETReturns page denied by robots.txt rules./deny
  • GETReturns a UTF-8 encoded body./encoding/utf8
  • GETReturns GZip-encoded data./gzip
  • GETReturns a simple HTML document./html
  • GETReturns a simple JSON document./json
  • GETReturns some robots.txt rules./robots.txt
  • GETReturns a simple XML document./xml

Dynamic data

  • GETDecodes base64url-encoded string./base64/:value
  • GETReturns n random bytes generated with given seed/bytes/:n
  • GETReturns a delayed response (max of 10 seconds)./delay/:delay
  • PUTReturns a delayed response (max of 10 seconds)./delay/:delay
  • POSTReturns a delayed response (max of 10 seconds)./delay/:delay
  • DELETEReturns a delayed response (max of 10 seconds)./delay/:delay
  • PATCHReturns a delayed response (max of 10 seconds)./delay/:delay
  • TRACEReturns a delayed response (max of 10 seconds)./delay/:delay
  • GETDrips data over a duration after an optional initial delay./drip?duration=2&numbytes=10&code=200&delay=2
  • GETGenerate a page containing n links to other pages which do the same./links/:n/:offset
  • GETStreams n random bytes generated with given seed, at given chunk size per packet./range/:numbytes
  • GETStreams n random bytes generated with given seed, at given chunk size per packet./stream-bytes/:n
  • GETStream n JSON responses/stream/:n
  • GETReturn a UUID4./uuid

Cookies

  • GETReturns cookie data./cookies
  • GETDeletes cookie(s) as provided by the query string and redirects to cookie list./cookies/delete?freeform=string
  • GETSets cookie(s) as provided by the query string and redirects to cookie list./cookies/set?freeform=string
  • GETSets a cookie and redirects to cookie list./cookies/set/:name/:value

Images

  • GETReturns a simple image of the type suggest by the Accept header./image
  • GETReturns a simple JPEG image./image/jpeg
  • GETReturns a simple PNG image./image/png
  • GETReturns a simple SVG image./image/svg
  • GETReturns a simple WEBP image./image/webp

Redirects

  • GETAbsolutely 302 Redirects n times./absolute-redirect/:n
  • GET302/3XX Redirects to the given URL./redirect-to?url=string&status_code=0
  • PUT302/3XX Redirects to the given URL./redirect-to
  • POST302/3XX Redirects to the given URL./redirect-to
  • DELETE302/3XX Redirects to the given URL./redirect-to
  • PATCH302/3XX Redirects to the given URL./redirect-to
  • TRACE302/3XX Redirects to the given URL./redirect-to
  • GET302 Redirects n times./redirect/:n
  • GETRelatively 302 Redirects n times./relative-redirect/:n

Anything

  • GETReturns anything passed in request data./anything
  • PUTReturns anything passed in request data./anything
  • POSTReturns anything passed in request data./anything
  • DELETEReturns anything passed in request data./anything
  • PATCHReturns anything passed in request data./anything
  • TRACEReturns anything passed in request data./anything
  • GETReturns anything passed in request data./anything/:anything
  • PUTReturns anything passed in request data./anything/:anything
  • POSTReturns anything passed in request data./anything/:anything
  • DELETEReturns anything passed in request data./anything/:anything
  • PATCHReturns anything passed in request data./anything/:anything
  • TRACEReturns anything passed in request data./anything/:anything

API details

Base URL
https://httpbin.org
Authentication
None declared in the description
Operations
78 operations on 52 pathsGET 48POST 7PUT 6PATCH 6DELETE 6TRACE 5
Main resources
Dynamic data 14Anything 12Redirects 9Response formats 9Auth 6Status codes 6HTTP Methods 5Images 5Response inspection 5Cookies 4
Description format
OpenAPI 3.0.0, API version 0.9.2
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the httpbin.org in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the httpbin.org collection, without the publisher's secrets.
  3. Add your credentialsOpen the collection's variables or an environment and enter your API key or token, if the API needs one.
  4. Send a requestPick an endpoint, for example “The request's DELETE parameters.” (DELETE /delete), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the httpbin.org?

A simple HTTP Request & Response Service. Run locally: $ docker run -p 80:80 kennethreitz/httpbin It is listed under Developer tools and has 78 endpoints.

Who publishes the httpbin.org?

It is listed from Httpbin's public API description (an OpenAPI document), not published by Httpbin on Swastik Codes. Anyone who controls httpbin.org can claim the profile by adding a DNS TXT record.

What is the base URL of the httpbin.org?

Requests go to https://httpbin.org. Endpoint paths are added to this base URL.

How do I authenticate with the httpbin.org?

Its OpenAPI description does not declare an authentication scheme. Some endpoints may be open; check the provider's documentation before relying on that.

How many endpoints does the httpbin.org have?

78 operations on 52 paths (48 GET, 7 POST, 6 PUT, 6 PATCH, 6 DELETE, 5 TRACE). The largest groups are Dynamic data, Anything, Redirects, Response formats.

Is forking the httpbin.org free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.