Added endpoints '/bytes/:n', '/stream-bytes/:n' and '/links/:n'.

'/bytes/:n' takes and optional 'seed' integer parameter, and returns n random
bytes of binary data (limited to 100KB in size).

'/stream-bytes/:n' is the same as above, but streams the data.  As well as a
'seed' parameter, it accepts a 'chunk_size' parameter, which determines how
many bytes are in each packet that is streamed.

'/links/:n' generates a page containing n links, each of which links to another
page containing those n links. The value of n is limited to 200.
This commit is contained in:
Dave Challis
2013-06-05 17:10:56 +01:00
committed by Dave Challis
parent f37c185b4a
commit 414a719b42
3 changed files with 76 additions and 0 deletions
+3
View File
@@ -32,6 +32,9 @@ Freely hosted in [HTTP](http://httpbin.org) &
- [`/robots.txt`](http://httpbin.org/robots.txt) Returns some robots.txt rules.
- [`/deny`](http://httpbin.org/deny) Denied by robots.txt file.
- [`/cache`](http://httpbin.org/cache) Returns 200 unless an If-Modified-Since or If-None-Match header is provided, when it returns a 304.
- [`/bytes/:n`](http://httpbin.org/bytes/1024) Generates *n* random bytes of binary data, accepts optional *seed* integer parameter.
- [`/stream-bytes/:n`](http://httpbin.org/stream-bytes/1024) Streams *n* random bytes of binary data, accepts optional *seed* and *chunk_size* integer parameters.
- [`/links/:n`](http://httpbin.org/links/10) Returns page containing *n* HTML links.
## DESCRIPTION