HTTP me is a tiny express 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.
As a Glitch project, you can remix this and customize it however you want! View the source code here.
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.
Directives that prolong the response are not subject to individual limits, but the response will be aborted after 30 seconds.
Any directive that does not require a value can be specified as a path segment. This returns the current time
/now
Add directives to the query string:
/foo?status=500&wait=1000
Add directives as request headers, prefixed with HM-
:
HM-Wait: 2000
HM-Status: 500
The following directives are available:
wait=<number>
: Sleep for <number>
milliseconds before starting the responsestatus=<number>
: Set <number>
as the HTTP Response status codeheader=<key>:<val>
: Add a response header of <key>: <val>
to the responsecacheable
: 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
)The following content directives are mutually exclusive. Only one will be honoured.
debug
: Output a JSON object describing the directives parsed from the requestnow
: 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 imagestream-sse=<duration>
: Output a Server Sent Events stream for <duration>
millisecondsbody=<string>
: Echo the input database64=<data>
: Echo the input data but base64-decode it firstesi
: Returns an HTML containing an ESI request to /time.txt, which returns the local server date and time.anything
: Returns a JSON response describing the request