mirror of
https://github.com/kennethreitz/httpbin.git
synced 2026-06-05 23:00:18 +00:00
Regenerate index page from README
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
<div class='mp'>
|
||||
<h1>httpbin(1): HTTP Request & Response Service</h1>
|
||||
<p>Freely hosted in <a href="http://httpbin.org">HTTP</a>,
|
||||
<a href="https://httpbin.org">HTTPS</a> &
|
||||
<a href="http://eu.httpbin.org">EU</a> flavors by <a href="https://www.runscope.com">Runscope</a>.</p>
|
||||
<p>Freely hosted in <a href="http://httpbin.org">HTTP</a>, <a href="https://httpbin.org">HTTPS</a> & <a href="http://eu.httpbin.org/">EU</a> flavors by <a href="https://www.runscope.com/">Runscope</a></p>
|
||||
|
||||
<h2 id="ENDPOINTS">ENDPOINTS</h2>
|
||||
|
||||
@@ -13,8 +11,8 @@
|
||||
<li><a href="/headers" data-bare-link="true"><code>/headers</code></a> Returns header dict.</li>
|
||||
<li><a href="/get" data-bare-link="true"><code>/get</code></a> Returns GET data.</li>
|
||||
<li><code>/post</code> Returns POST data.</li>
|
||||
<li><code>/put</code> Returns PUT data.</li>
|
||||
<li><code>/patch</code> Returns PATCH data.</li>
|
||||
<li><code>/put</code> Returns PUT data.</li>
|
||||
<li><code>/delete</code> Returns DELETE data</li>
|
||||
<li><a href="/gzip" data-bare-link="true"><code>/gzip</code></a> Returns gzip-encoded data.</li>
|
||||
<li><a href="/deflate" data-bare-link="true"><code>/deflate</code></a> Returns deflate-encoded data.</li>
|
||||
@@ -26,24 +24,28 @@
|
||||
<li><a href="/cookies" data-bare-link="true"><code>/cookies</code></a> Returns cookie data.</li>
|
||||
<li><a href="/cookies/set?k1=v1&k2=v2"><code>/cookies/set?name=value</code></a> Sets one or more simple cookies.</li>
|
||||
<li><a href="/cookies/delete?k1&k2"><code>/cookies/delete?name</code></a> Deletes one or more simple cookies.</li>
|
||||
<li><a href="/basic-auth/user/passwd"><code>/basic-auth/:user/:passwd</code></a> HTTPBasic Auth.</li>
|
||||
<li><a href="/basic-auth/user/passwd"><code>/basic-auth/:user/:passwd</code></a> Challenges HTTPBasic Auth.</li>
|
||||
<li><a href="/hidden-basic-auth/user/passwd"><code>/hidden-basic-auth/:user/:passwd</code></a> 404'd BasicAuth.</li>
|
||||
<li><a href="/digest-auth/auth/user/passwd"><code>/digest-auth/:qop/:user/:passwd</code></a> HTTP Digest Auth.</li>
|
||||
<li><a href="/digest-auth/auth/user/passwd"><code>/digest-auth/:qop/:user/:passwd</code></a> Challenges HTTP Digest Auth.</li>
|
||||
<li><a href="/stream/20"><code>/stream/:n</code></a> Streams <em>n</em>–100 lines.</li>
|
||||
<li><a href="/delay/3"><code>/delay/:n</code></a> Delays responding for <em>n</em>–10 seconds.</li>
|
||||
<li><a href="/drip?numbytes=400&duration=3&delay=1"><code>/drip?numbytes=400&duration=3&delay=1</code></a> Drip drip drip.</li>
|
||||
<li><a href="/drip?numbytes=5&duration=5"><code>/drip?numbytes=n&duration=s&delay=s</code></a> Drips data over a duration after an optional initial delay.</li>
|
||||
<li><a href="/html" data-bare-link="true"><code>/html</code></a> Renders an HTML Page.</li>
|
||||
<li><a href="/robots.txt" data-bare-link="true"><code>/robots.txt</code></a> Returns some robots.txt rules.</li>
|
||||
<li><a href="/deny" data-bare-link="true"><code>/deny</code></a> Denied by robots.txt file.</li>
|
||||
<li><a href="/cache" data-bare-link="true"><code>/cache</code></a> 200 unless If-Modified-Since was sent, then 304.</li>
|
||||
<li><a href="/forms/post" data-bare-link="true"><code>/forms/post</code></a> HTML form that submits to <code>/post</code>.</li>
|
||||
<li><a href="/xml" data-bare-link="true"><code>/xml</code></a> Returns some XML.</li>
|
||||
<li><a href="/cache" data-bare-link="true"><code>/cache</code></a> Returns 200 unless an If-Modified-Since or If-None-Match header is provided, when it returns a 304.</li>
|
||||
<li><a href="/cache/60"><code>/cache/:n</code></a> Sets a Cache-Control header for <em>n</em> seconds.</li>
|
||||
<li><a href="/bytes/1024"><code>/bytes/:n</code></a> Generates <em>n</em> random bytes of binary data, accepts optional <em>seed</em> integer parameter.</li>
|
||||
<li><a href="/stream-bytes/1024"><code>/stream-bytes/:n</code></a> Streams <em>n</em> random bytes of binary data, accepts optional <em>seed</em> and <em>chunk_size</em> integer parameters.</li>
|
||||
<li><a href="/links/10"><code>/links/:n</code></a> Returns page containing <em>n</em> HTML links.</li>
|
||||
<li><a href="/forms/post" data-bare-link="true"><code>/forms/post</code></a> HTML form that submits to <em>/post</em></li>
|
||||
<li><a href="/xml" data-bare-link="true"><code>/xml</code></a> Returns some XML</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
||||
|
||||
<p>Testing an HTTP Library can become difficult sometimes. <a href="http://postbin.org">Postbin</a> is fantastic
|
||||
<p>Testing an HTTP Library can become difficult sometimes. <a href="http://postbin.org">PostBin.org</a> is fantastic
|
||||
for testing POST requests, but not much else. This exists to cover all kinds of HTTP
|
||||
scenarios. Additional endpoints are being considered.</p>
|
||||
|
||||
@@ -88,9 +90,56 @@ x-more-info: http://tools.ietf.org/html/rfc2324
|
||||
Content-Length: 135
|
||||
</code></pre>
|
||||
|
||||
<h3 id="-curl-https-httpbin-org-get-show_env-1">$ curl https://httpbin.org/get?show_env=1</h3>
|
||||
|
||||
<pre><code>{
|
||||
"headers": {
|
||||
"Content-Length": "",
|
||||
"Accept-Language": "en-US,en;q=0.8",
|
||||
"Accept-Encoding": "gzip,deflate,sdch",
|
||||
"X-Forwarded-Port": "443",
|
||||
"X-Forwarded-For": "109.60.101.240",
|
||||
"X-Heroku-Dynos-In-Use": "1",
|
||||
"Host": "httpbin.org",
|
||||
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
||||
"User-Agent": "Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.83 Safari/535.11",
|
||||
"X-Request-Start": "1350053933441",
|
||||
"Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.3",
|
||||
"Connection": "keep-alive",
|
||||
"X-Forwarded-Proto": "https",
|
||||
"Cookie": "_gauges_unique_day=1; _gauges_unique_month=1; _gauges_unique_year=1; _gauges_unique=1; _gauges_unique_hour=1",
|
||||
"X-Heroku-Queue-Depth": "0",
|
||||
"X-Heroku-Queue-Wait-Time": "11",
|
||||
"Content-Type": ""
|
||||
},
|
||||
"args": {
|
||||
"show_env": "1"
|
||||
},
|
||||
"origin": "109.60.101.240",
|
||||
"url": "http://httpbin.org/get?show_env=1"
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<h2 id="Installing-and-running-from-PyPI">Installing and running from PyPI</h2>
|
||||
|
||||
<p>You can install httpbin as a library from PyPI and run it as a WSGI app. For example, using Gunicorn:</p>
|
||||
|
||||
<pre><code class="bash">$ pip install httpbin
|
||||
$ gunicorn httpbin:app
|
||||
</code></pre>
|
||||
|
||||
<h2 id="Changelog">Changelog</h2>
|
||||
|
||||
<ul>
|
||||
<li>0.1.2: Fix a couple Python3 bugs with the random byte endpoints, fix a bug when uploading files without a Content-Type header set.</li>
|
||||
<li>0.1.1: Added templates as data in setup.py</li>
|
||||
<li>0.1.0: Added python3 support and (re)publish on PyPI</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2 id="AUTHOR">AUTHOR</h2>
|
||||
|
||||
<p>A <a href="http://kennethreitz.com/pages/open-projects.html">Kenneth Reitz</a>
|
||||
<p>A <a href="http://kennethreitz.com/">Kenneth Reitz</a>
|
||||
Project.</p>
|
||||
|
||||
<h2 id="SEE-ALSO">SEE ALSO</h2>
|
||||
|
||||
Reference in New Issue
Block a user