Revision [1407]

This is an old revision of CommandHttp made by DavidLee on 2010-05-13 17:58:25.

 

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 performs an HTTP OPTIONS

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

Connection Options

-connectTimeout time Sets the connection timeout
-contentType content-type Sets the content type in the request property
-readTimeout time Sets the read timeout
-useCaches,+useCachesTurns on (off) caching
-followRedirects,+followRedirectsTurns on (off) redirection
-user username Authenticates with username
-password password Authenticates with password
-add-header name=value Adds a HTTP header

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.


Examples

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

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