From eacc7ac58de6701416cbe5d44a4d3dfa4ba679a2 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Wed, 10 Aug 2016 06:51:17 -0500 Subject: [PATCH] Update documentation with new redirect-to examples redirect-to now allows for a status_code parameter. This updates the index page and README to reflect that appropriately. --- README.rst | 3 +++ httpbin/templates/httpbin.1.html | 1 + 2 files changed, 4 insertions(+) diff --git a/README.rst b/README.rst index 84c6d62..9e26919 100644 --- a/README.rst +++ b/README.rst @@ -33,6 +33,7 @@ Endpoint Description `/response-headers`_ Returns given response headers. `/redirect/:n`_ 302 Redirects *n* times. `/redirect-to?url=foo`_ 302 Redirects to the *foo* URL. +`/redirect-to?url=foo&status_code=307`_ 307 Redirects to the *foo* URL. `/relative-redirect/:n`_ 302 Relative redirects *n* times. `/cookies`_ Returns cookie data. `/cookies/set?name=value`_ Sets one or more simple cookies. @@ -68,6 +69,8 @@ Endpoint Description .. _/response-headers: http://httpbin.org/response-headers?Content-Type=text/plain;%20charset=UTF-8&Server=httpbin .. _/redirect/:n: http://httpbin.org/redirect/6 .. _/redirect-to?url=foo: http://httpbin.org/redirect-to?url=http://example.com/ +.. _/redirect-to?url=foo&status_code=307: + http://httpbin.org/redirect-to?url=http://example.com/&status_code=307 .. _/relative-redirect/:n: http://httpbin.org/relative-redirect/6 .. _/cookies: http://httpbin.org/cookies .. _/cookies/set?name=value: http://httpbin.org/cookies/set?k1=v1&k2=v2 diff --git a/httpbin/templates/httpbin.1.html b/httpbin/templates/httpbin.1.html index e57296c..96ea890 100644 --- a/httpbin/templates/httpbin.1.html +++ b/httpbin/templates/httpbin.1.html @@ -21,6 +21,7 @@
  • /response-headers?key=val Returns given response headers.
  • /redirect/:n 302 Redirects n times.
  • /redirect-to?url=foo 302 Redirects to the foo URL.
  • +
  • /redirect-to?url=foo&status_code=307 307 Redirects to the foo URL.
  • /relative-redirect/:n 302 Relative redirects n times.
  • /absolute-redirect/:n 302 Absolute redirects n times.
  • /cookies Returns cookie data.