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>)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=<duration>: Output a plain stream that sends a character every <duration> milliseconds. Capped at 30 seconds.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