On Fri, Apr 12, 2013 at 10:48:42AM +0200, Michele Tartara wrote:
> Provide some more insights about how to use the RAPI from the command line
> through the "curl" command.
> 
> Signed-off-by: Michele Tartara <[email protected]>
> ---
>  doc/rapi.rst |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/doc/rapi.rst b/doc/rapi.rst
> index 10cd80e..28f6ae9 100644
> --- a/doc/rapi.rst
> +++ b/doc/rapi.rst
> @@ -95,7 +95,8 @@ When using the RAPI, username and password can be sent to 
> the server
>  by using the standard HTTP basic access authentication. This means that
>  for accessing the protected URL ``https://cluster.example.com/resource``,
>  the address ``https://username:[email protected]/resource`` should
> -be used instead.
> +be used instead. Alternatively, the appropriate parameter of your HTTP client
> +(such as ``-u`` for ``curl``) can be used.
>  
>  .. [#pwhash] Using the MD5 hash of username, realm and password is
>     described in :rfc:`2617` ("HTTP Authentication"), sections 3.2.2.2
> @@ -304,7 +305,10 @@ or ``curl``::
>    $ curl https://%CLUSTERNAME%:5080/2/info
>  
>  Note: with ``curl``, the request method (GET, POST, PUT) can be specified
> -using the ``-X`` command line option.
> +using the ``-X`` command line option, and the username/password can be
> +specified with the ``-u`` option. In case of POST requests with a body, the
> +Content-Type can be set to JSON (as per the Protocol_ section) using the
> +parameter ``-H "Content-Type: application/json"``.
>  
>  Python
>  ++++++

LGTM Thanks.

-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Graham Law, Katherine Stephens


Reply via email to