HTTP me is an app initally designed to replicate the features of HTTPBin.org: being a convenient server that you can use to trigger a certain HTTP response behaviour.
It was previously a JavaScript project on Glitch, but has since been migrated to a Rust application running on Fastly Compute.
Request any path you like, as long as it is not / (which produces this page). Most directives can be duplicated or combined, and can be specified in multiple ways. If directives are mutually exclusive, those specified later take priority, and path segments take priority over query args, which take priority over headers.
Any directive can be specified as a path segment. This returns the current time:
/now
Or this returns a 500 status code:
/status=500
Directives can also be part of the query string. Stackable directives (see below) can be specified multiple times, such as header:
/now?wait=1000&header=Cache-Control:max-age=300&header=Content-Type:text/plain
Add directives as request headers, prefixed with HM-:
HM-Wait: 2000
HM-Status: 500
The following stackable directives are available:
wait=<number>: Sleep for <number> milliseconds before starting the response. Capped at 30 seconds.status=<number>: Set <number> as the HTTP Response status codeheader=<key>:<val>: Set the response's header for <key> to <val>, replacing any previously-specified valueappend-header=<key>:<val>: Add a response header of <key>: <val> to the response, allowing multiple headers with the same keycacheable: Make the response cacheable for a short period (shorthand for header=Cache-Control:max-age=300)cache=<number>: Make the response cacheable for a custom period (shorthand for header=Cache-Control:max-age=<number>)no-cache: Make the response uncacheable (shorthand for header=Cache-Control:no-store,private)redirect=<url>: Redirect to the specified URL with a 308 status code (shorthand for status=308 and header=Location:<url>)chunk-size=<bytes>: Stream the response body in chunks of <bytes> bytes (capped at 96 KB). For buffered body directives, this causes the response to be streamed instead of sent all at once. Overrides drip's default 1-byte chunks and body-size's default 64 KB chunks. Ignored for stream-sse.chunk-delay-ms=<ms>: Sleep <ms> milliseconds between chunks (capped at 2 seconds). For drip, overrides the default 1-second delay. Ignored for stream-sse.The following content directives are mutually exclusive. Only one will be honoured.
debug: Output a JSON object describing the directives parsed from the requestnow / time: Output the current timeip: Output the IP address of the requesting clienthtml: Output a valid HTML pagejson: Output a valid JSON documentimage-jpeg: Output a JPEG imageimage-png: Output a PNG imageimage-webp: Output a WEBP imageimage-gif: Output an animated GIF imageimage-svg: Output an SVG imagestream-sse=<duration>: Output a Server Sent Events stream for <duration> milliseconds. Capped at 30 seconds.drip=<count>: Output a plain stream that sends one chunk per iteration for <count> iterations (default: 10, capped at 100). Total wall-clock time is capped at 30 seconds. Chunk size defaults to 1 byte, delay defaults to 1 second; both are overridable via chunk-size and chunk-delay-ms.body-size=<bytes>: Generate a response body of exactly <bytes> bytes with a Content-Length header, streamed in 64 KB chunks (overridable via chunk-size). Capped at 10 MB. Body content is filler. Useful for testing large responses without buffering the entire body in memory.body=<string>: Echo the input database64=<data>: Echo the input data but base64-decode it firstesi: Returns an HTML containing an ESI request to /time, which returns the local server date and time.gzip: Returns a gzipped JSON responseanything: Returns a JSON response describing the request