Revision [652]

This is an old revision of CommandHttp made by DavidLee on 2009-07-28 08:54:21.

 

Command http


Name

http http client

Synopsis

http [options]


Options


Requests

-get url performs an HTTP GET
-put url performs an HTTP PUT
-post url performs an HTTP POST
-delete url performs an HTTP DELETE
-trace url performs an HTTP TRACE
-head url performs an HTTP HEAD
-options url perfomms an HTTP OPTIONS

If no request options are supplied then -get is assumed.

Connection Options

-connectTimeout time Sets the connection timeout
-readTimeout time Sets the read timeout
-useCaches / +useCaches Turns on (off) caching
-followRedirects / +followRedirects Turns on (off) redirection
-user username Authenticates with username
-password password Authenticates with password

Time is specified in seconds, and can be fractional such as 2.5

If username and password are both supplied then Basic Authentication is used.

For -put and -post the standard input is read and used as the input to the HTTP command.
For all commands the output of the HTTP command is sent to standard output.


Example

http -get http://www.xmlsh.org

Return Value

Returns 0 if the is return code of the request is 200, otherwise returns the return code

CategoryCommands

There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki