httptest
Endpoints:
/ip
Returns Origin IP.
/user-agent
Returns user-agent.
/headers
Returns headers.
/get
Returns GET data.
/post
Returns POST data.
/args
Returns GET/POST args.
/status/:code
Returns given HTTP Status code.
/redirect/:n
302 Redirects n times.
/absolute-redirect/:n
302 Absolute redirects n times.
/redirect-to?url=foo
302 Redirects to the foo URL.
/stream/:n
Streams n lines of JSON objects.
/delay/:n
Delays responding for min(n, 10) seconds.
/bytes/:n
Generates n random bytes of binary data, accepts optional seed integer parameter.
/cookies
Returns the cookies.
/cookies/set?name=value
Sets one or more simple cookies.
/cookies/delete?name
Deletes one or more simple cookies.
/drip?numbytes=n&duration=s&delay=s&code=code
Drips data over a duration after
an optional initial delay , then optionally returns with the given status code .
/cache
Returns 200 unless an If-Modified-Since or If-None-Match header is provided, when it returns a 304.
/cache/:n
Sets a Cache-Control header for n seconds.
/gzip
Returns gzip-encoded data.
/deflate
Returns deflate-encoded data.
/robots.txt
Returns some robots.txt rules.
/deny
Denied by robots.txt file.
/basic-auth/:user/:passwd
Challenges HTTP Basic Auth.
/hidden-basic-auth/:user/:passwd
Challenges HTTP Basic Auth and returns 404 on failure.
/html
Returns some HTML.
/xml
Returns some XML.
/image/gif
Returns page containing an animated GIF image.
/image/png
Returns page containing a PNG image.
/image/jpeg
Returns page containing a JPEG image.