HTTPBin API Documentation
Overview
The HTTPBin API is a testing service for HTTP requests and responses. It provides a variety of endpoints to test different HTTP methods, authentication mechanisms, status codes, request/response inspection, and more. This document provides an overview of the available endpoints and their functionalities.
General Information
- Title: httpbin.org
- Description: A golang port of the venerable httpbin.org HTTP request & response testing service.
- Contact: GitHub Repository
- Version: 0.0.1
- Base URL:
https://httpbingo.org/
Tags and Categories
The API is organized into the following categories:
- HTTP Methods: Testing different HTTP verbs.
- Auth: Authentication methods.
- Status Codes: Generate responses with specific status codes.
- Request Inspection: Inspect request data.
- Response Inspection: Inspect response data like caching and headers.
- Response Formats: Return responses in different data formats.
- Dynamic Data: Generate random and dynamic data.
- Cookies: Create, read, and delete cookies.
- Images: Return different image formats.
- Redirects: Return different redirect responses.
- Anything: Return anything passed in the request.
Endpoints
1. HTTP Methods
GET /get: Returns the request's query parameters.POST /post: Returns the request's POST parameters.PUT /put: Returns the request's PUT parameters.DELETE /delete: Returns the request's DELETE parameters.PATCH /patch: Returns the request's PATCH parameters.
2. Auth
GET /basic-auth/{user}/{passwd}: Prompts for HTTP Basic Auth.GET /bearer: Prompts for bearer authentication.GET /digest-auth/{qop}/{user}/{passwd}: Prompts for Digest Auth.
3. Status Codes
GET /status/{codes}: Returns specific or random status codes.
4. Request Inspection
GET /headers: Returns the incoming request's HTTP headers.GET /ip: Returns the requester's IP address.GET /user-agent: Returns the User-Agent header.
5. Response Inspection
GET /cache: Returns a 304 if caching headers are present.GET /etag/{etag}: Responds to If-None-Match and If-Match headers.
6. Response Formats
GET /json: Returns a simple JSON document.GET /xml: Returns a simple XML document.GET /html: Returns a simple HTML document.GET /robots.txt: Returns robots.txt rules.
7. Dynamic Data
GET /uuid: Returns a UUID4.GET /base64/{value}: Decodes a base64-encoded string.GET /delay/{delay}: Returns a delayed response.
8. Cookies
GET /cookies: Returns cookie data.GET /cookies/set/{name}/{value}: Sets a cookie and redirects to the cookie list.GET /cookies/delete: Deletes cookies and redirects to the cookie list.
9. Images
GET /image/jpeg: Returns a JPEG image.GET /image/png: Returns a PNG image.GET /image/svg: Returns an SVG image.GET /image/webp: Returns a WEBP image.
10. Redirects
GET /redirect/{n}: Redirectsntimes.GET /absolute-redirect/{n}: Absolutely redirectsntimes.GET /relative-redirect/{n}: Relatively redirectsntimes.
11. Anything
GET /anything: Returns anything passed in the request.GET /anything/{anything}: Returns anything passed in the request.
Additional Information
For more details, refer to the OpenAPI Specification.