From 7c68d87c103a91d8d3603bc783881cb4cc8c85c2 Mon Sep 17 00:00:00 2001 From: Jakub Roztocil Date: Thu, 10 Mar 2016 14:27:33 +0800 Subject: [PATCH] README --- CHANGELOG.rst | 4 ++-- README.rst | 32 ++++++++++++++++---------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c70698d5..ce50d302 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,8 +15,8 @@ This project adheres to `Semantic Versioning `_. * Added JSON detection with ``--json, -j`` to work around incorrect ``Content-Type`` * Added ``--all`` to show intermediate responses such as redirects (with ``--follow``) -* Added ``--print-others, -P WHAT`` -* Added ``--max-redirects`` (default 30) +* Added ``--print-others, -P WHAT`` to specify formatting of intermediate responses +* Added ``--max-redirects=N`` (default 30) * Added ``-A`` as short name for ``--auth-type`` * Added ``-F`` as short name for ``--follow`` * Removed the ``implicit_content_type`` config option diff --git a/README.rst b/README.rst index 077b0ed5..596a67fc 100644 --- a/README.rst +++ b/README.rst @@ -821,10 +821,10 @@ the HTTP exchange: ========== ================== Character Stands for ========== ================== -``H`` Request headers. -``B`` Request body. -``h`` Response headers. -``b`` Response body. +``H`` request headers +``B`` request body +``h`` response headers +``b`` response body ========== ================== Print request and response headers: @@ -838,27 +838,27 @@ Print request and response headers: Viewing Intermediary Requests/Responses --------------------------------------- -If you'd like to see any intermediary requests/responses together with the -final one, then use the ``--all`` option. Intermediary requests include -followed redirects (with ``--follow``), the first unauthorized request when -Digest auth is used (``--auth=digest``), etc. They are by default also -formatted according to ``--print, -p`` (and its shortcuts described above), -which can be customized with ``--print-others, -P`` which takes the same -arguments as ``--print, -p`` but applies to the intermediary requests only. - - -View all responses that lead to the final one: +To see any intermediary requests/responses together with the final one, +use the ``--all`` option. Intermediary requests include followed redirects +(with ``--follow``), the first unauthorized request when HTTP digest +authentication is used (``--auth=digest``), etc. .. code-block:: bash + # Include all responses that lead to the final one: $ http --all --follow httpbin.org/redirect/3 -Print the final and the intermediary requests/responses differently: +The intermediary requests/response are by default formatted according to +``--print, -p`` (and its shortcuts described above). If you'd like to change +that, use the ``--print-others, -P`` option. It takes the same +arguments as ``--print, -p`` but applies to the intermediary requests only. + .. code-block:: bash - $ http --all --follow --print=hH --print-others=H httpbin.org/redirect/3 + # Print the intermediary requests/responses differently than the final one: + $ http -A digest -a foo:bar --all -p Hh -P H httpbin.org/digest-auth/auth/foo/bar -------------------------