Wiki source for CommandHttp


Show raw source

======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,+useCaches||Turns on (off) caching||
||-followRedirects,+followRedirects||Turns on (off) redirection||
||-user username|| Authenticates with username||
||-password password|| Authenticates with password||
||-H,-add-header name=value|| Adds a HTTP header||
||-disableTrust protocol||Disables certificate trust validate for the specified procol||
||-keystore filename||Path to keystore for local client certificates||
||-keypass pass||Passphrase for keystore||
||-sslproto||Override the default (SSLv3) protocol for use when -keystore is used||


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====
%%(shell)
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]]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki