actix-httpbin
HTTP methods
/get | GET data |
---|---|
/post | POST data |
/patch | PATCH data |
/put | PUT data |
/delete | DELETE data |
Auth
/basic-auth/{user}/{passwd} | Challenges HTTP Basic Auth |
---|---|
/hidden-basic-auth/{user}/{passwd} | 404'd HTTP Basic Auth |
/digest-auth/{qop}/{user}/{passwd}/{algorithm} | Challenges HTTP Digest Auth |
Status codes
/status/{code} | Given HTTP status code |
---|
Request inspection
/ip | Requester IP address |
---|---|
/headers | HTTP headers |
/user-agent | User-Agent header |
Response inspection
/cache | Returns a HTTP 304 if an If-Modified-Since or If-None-Match is present |
---|---|
/cache/{value} | Sets a Cache-Control header for value seconds |
/etag/{etag} | Assumes the resource has the given etag and responds to If-None-Match and If-Match headers appropriately |
/response-headers?key=val | Given response headers |
Response formats
/encoding/utf8 | Page containing UTF-8 data |
---|---|
/gzip | Gzip-encoded data |
/deflate | Deflate-encoded data |
/brotli | Brotli-encoded data |
/json | JSON document |
/forms/post | HTML form that posts to /post |
Dynamic data
/uuid | UUID4 |
---|---|
/base64/{value} | Decodes base64url-encoded string |
/stream/{n} | Stream n JSON responses |
/delay/{n} | Returns a response delayed to {n} seconds |
/bytes/{n}?seed={seed} | Returns {n} random bytes generated with optional {seed} |
/stream-bytes/{n}?seed={seed}&chunk_size={size} | Streams {n} random bytes generated with optional {seed}, at given chunk size per packet. |
/links/{total}/{current} | Generate a page containing {total} links to other pages which do the same. |
Redirects
/redirect/{n} | 302 redirects {n} times |
---|---|
/redirect-to?url=foo | 302 redirects to the foo URL |
/redirect-to?url=foo&status_code=307 | 302 redirects to the foo URL with optional status_code |
/relative-redirect/{n} | 302 relative redirects {n} times |
/absolute-redirect/{n} | 302 absolute redirects {n} times |
Cookies
/cookies | Cookie data |
---|---|
/cookies/set?name=value | Set one or more simple cookies |
/cookies/set/{name}/{value} | Set one simple cookie with name {name} and value {value} |
/cookies/delete?name | Delete one or more simple cookies |
Anything
/anything | Request data, including method used |
---|---|
/anything/{path} | Request data, including method and URL used |