272 lines
14 KiB
HTML
272 lines
14 KiB
HTML
|
<!-- BeginDsi "dsi/head.html" -->
|
||
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<title>Embedthis Appweb 4.3.4 Documentation</title>
|
||
|
<meta name="keywords" content="embedded web server, web server software, embedded HTTP, application web server,
|
||
|
embedded server, small web server, HTTP server, library web server, library HTTP, HTTP library" />
|
||
|
<meta name="description" content="Embedthis Sofware provides commercial and open source embedded web servers for
|
||
|
devices and applications." />
|
||
|
<meta name="robots" content="index,follow" />
|
||
|
<link href="../../../doc.css" rel="stylesheet" type="text/css" />
|
||
|
<link href="../../../print.css" rel="stylesheet" type="text/css" media="print"/>
|
||
|
<!--[if IE]>
|
||
|
<link href="../../../iehacks.css" rel="stylesheet" type="text/css" />
|
||
|
<![endif]-->
|
||
|
<link href="http://www.google.com/cse/style/look/default.css" type="text/css" rel="stylesheet" />
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<div class="top">
|
||
|
<a class="logo" href="http://appwebserver.org/"> </a>
|
||
|
<div class="topRight">
|
||
|
<div class="search">
|
||
|
<div id="cse-search-form"></div>
|
||
|
<div class="version">Embedthis Appweb 4.3.4</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="crumbs">
|
||
|
<a href="../../../index.html">Home</a>
|
||
|
<!-- EndDsi -->
|
||
|
> <a href="index.html">Users Guide</a> > <b>Http client</b>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="content">
|
||
|
<div class="contentRight">
|
||
|
<h1>Quick Nav</h1>
|
||
|
<ul class="nav">
|
||
|
<li><a href="#synopsis">Synopsis</a></li>
|
||
|
<li><a href="#options">Options</a></li>
|
||
|
<li><a href="#description">Description</a></li>
|
||
|
</ul>
|
||
|
<!-- BeginDsi "dsi/usersGuideSeeAlso.html" -->
|
||
|
<h1>See Also</h1>
|
||
|
<ul class="nav">
|
||
|
<li><a href="../../../guide/appweb/users/index.html">User Guide Overview</a></li>
|
||
|
<li><a href="../../../guide/appweb/users/configuration.html">Configuring Appweb</a></li>
|
||
|
<li><a href="../../../guide/appweb/users/ports.html">Ports and Binding</a></li>
|
||
|
<li><a href="../../../guide/appweb/users/lang.html">Multi-Language Support</a></li>
|
||
|
<li><a href="../../../guide/appweb/users/authentication.html">User Authorization</a></li>
|
||
|
<li><a href="../../../guide/appweb/users/logFiles.html">Log Files</a></li>
|
||
|
<li><a href="../../../guide/appweb/users/vhosts.html">Virtual Hosts</a></li>
|
||
|
<li><a href="../../../guide/appweb/users/security.html">Security Considerations</a></li>
|
||
|
<li><a href="../../../guide/appweb/users/ssl.html">SSL</a></li>
|
||
|
<li><a href="../../../guide/appweb/users/modules.html">Appweb Modules</a></li>
|
||
|
<li><a href="../../../guide/appweb/users/stages.html">Pipeline Stages</a></li>
|
||
|
<li><a href="../../../guide/appweb/users/client.html">HTTP Client</a></li>
|
||
|
<li><a href="../../../guide/appweb/users/webSockets.html">WebSockets</a></li>
|
||
|
<li><a href="../../../guide/appweb/users/frameworks.html">Web Frameworks</a></li>
|
||
|
<li><a href="../../../ref/appweb/architecture.html">Appweb Architecture</a></li>
|
||
|
</ul>
|
||
|
<!-- EndDsi -->
|
||
|
</div>
|
||
|
<div class="contentLeft">
|
||
|
<h1>Appweb HTTP Client</h1>
|
||
|
<p>http — HTTP client program.</p><a id="synopsis"></a>
|
||
|
<h2>Synopsis</h2>
|
||
|
<p>http [options] URIs ...</p><a id="description"></a>
|
||
|
<h2>Description</h2>
|
||
|
<p>The <b>http</b> utility uses the Appweb HTTP client library to retrieve documents from HTTP servers. It
|
||
|
supports HTTP, SSL, authentication and form data and the GET, POST, PUT, DELETE, OPTIONS and TRACE HTTP
|
||
|
methods. The <b>http</b> client was primarily designed to test the Appweb server.</p><a id="options"></a>
|
||
|
<h2>Options</h2>
|
||
|
<table class="full" title="options">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>Option</th>
|
||
|
<th>Description</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<tr>
|
||
|
<td>--benchmark</td>
|
||
|
<td>Output timing results after retrieving URLs.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--cert file</td>
|
||
|
<td>Certificate CA file to validate server certificates.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--chunk size</td>
|
||
|
<td>Request that web server use transfer encoding for the response and break the response data
|
||
|
into chunks of the requested size. This is an Appweb web server custom header and will be
|
||
|
ignored by other web servers.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--continue</td>
|
||
|
<td>Continue on errors. Default is to stop on the first error.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--cookie cookieString</td>
|
||
|
<td>Define a cookie string to send with the request. Multiple uses okay.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--data bodyData</td>
|
||
|
<td>String of raw body data to send with the request. Assumed to not be URL encoded. You cannot
|
||
|
use this switch with either the --datafile or --form switches.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--debugger</td>
|
||
|
<td>Disable timeouts to make running in a debugger easier.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--delete</td>
|
||
|
<td>Use DELETE method. Shortcut for --method DELETE.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--form formData</td>
|
||
|
<td>String of body data to send with the request. Assumed to be URL encoded. i.e.
|
||
|
"name=paul&address=uk". You cannot use this switch with either the --datafile or --form
|
||
|
switches.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="nowrap">--header "key: value"</td>
|
||
|
<td>Add a custom header to send with the request. Multiple --header switches can be
|
||
|
supplied.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--host name</td>
|
||
|
<td>Prepend all URLs with the specified host. For example if '-h www.myHost.com:8888" were used
|
||
|
with the URL "/index.html", then http will retrieve http://www.myHost.com:8888.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--insecure</td>
|
||
|
<td>Don't validate server certificates when using SSL.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--iterations count</td>
|
||
|
<td>Retrieve the URLs iterations times. Useful for load testing. This switch can also be
|
||
|
abbreviated as -i.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--log logSpec</td>
|
||
|
<td>Specify a file to log messages. The syntax is: "--log log- Name[,moduleName][:logLevel]".
|
||
|
Level 3 will trace the request and response headers.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--method method</td>
|
||
|
<td>Set the HTTP method. Values may be "GET", "PUT", "OPTIONS", "TRACE".</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--nofollow</td>
|
||
|
<td>Don't automatically follow redirect responses.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--noout</td>
|
||
|
<td>Run in quiet mode and do no output. Suppress tracing requests. This switch can also be
|
||
|
abbreviated as -n.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--out filename</td>
|
||
|
<td>Send output to the given file.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="nowrap">--password passPhrase</td>
|
||
|
<td>Specify a password to send with the request. Requires a user name to be also specified via
|
||
|
--user.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--post</td>
|
||
|
<td>Use POST method. Shortcut for --method POST.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--printable</td>
|
||
|
<td>Make binary output printable by printing hex digits for each character.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="nowrap">--protocol HTTP_VERSION</td>
|
||
|
<td>Use the specified HTTP protocol. httpVersion should be either '0' for HTTP/1.0 or '1' for
|
||
|
HTTP/1.1.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--put</td>
|
||
|
<td>Use PUT method. Shortcut for --method PUT.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--range byteRange</td>
|
||
|
<td>Request that only the specified byte range of data be returned with the response. This will
|
||
|
add a "Range" header to the request. The range format is: Range: bytes=n1-n2,n3-n4,... where n1
|
||
|
is first byte position and n2 is last byte position. Multiple --range switches can be supplied.
|
||
|
Examples: 0-49 first 50 bytes 50-99,200-249 Two 50 byte ranges from 50 and 200 -50 Last 50
|
||
|
bytes 1- Skip first byte then emit the rest</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--retries count</td>
|
||
|
<td>Retry failed requests this number of times.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--showHeaders</td>
|
||
|
<td>Output HTTP headers. Useful for debugging.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--showStatus</td>
|
||
|
<td>Output the HTTP response status code.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--single</td>
|
||
|
<td>Single step between requests by pausing for user input before proceeding.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--threads loadThreads</td>
|
||
|
<td>Number of threads to use. Each URL will be retrieved by all threads. Useful only for load
|
||
|
testing.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--timeout seconds</td>
|
||
|
<td>Specify a timeout to use for each request in seconds.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--upload</td>
|
||
|
<td>Use multipart mime file upload for the body content</td>
|
||
|
<tr>
|
||
|
<td>--user user</td>
|
||
|
<td>Specify a user name to send with the request. If a password is not specified via
|
||
|
--password, the program will prompt for a password (which will not be echoed). The username and
|
||
|
password will be sent with the request according to the authentication protocol required by the
|
||
|
requested web server and requested document.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--verbose</td>
|
||
|
<td>Verbose mode. Trace activity to stdout. Can by specified multiple times for more verbose
|
||
|
tracing. This switch can also be abbreviated as -v.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>--workers count</td>
|
||
|
<td>Set maximum number of worker threads.</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!-- BeginDsi "dsi/bottom.html" -->
|
||
|
<div class="bottom">
|
||
|
<p class="footnote">
|
||
|
<a href="../../../product/copyright.html" >© Embedthis Software LLC, 2003-2013.
|
||
|
All rights reserved. Embedthis, Appweb, ESP, Ejscript and Embedthis GoAhead are trademarks of Embedthis Software LLC.</a>
|
||
|
</p>
|
||
|
</div>
|
||
|
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
|
||
|
<script type="text/javascript">
|
||
|
google.load('search', '1', {language : 'en'});
|
||
|
google.setOnLoadCallback(function() {
|
||
|
var customSearchControl = new google.search.CustomSearchControl(
|
||
|
'000262706376373952077:1hs0lhenihk');
|
||
|
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
|
||
|
var options = new google.search.DrawOptions();
|
||
|
options.enableSearchboxOnly("http://appwebserver.org/search.html");
|
||
|
customSearchControl.draw('cse-search-form', options);
|
||
|
}, true);
|
||
|
</script>
|
||
|
<script type="text/javascript">
|
||
|
var _gaq = _gaq || [];
|
||
|
_gaq.push(['_setAccount', 'UA-179169-2']);
|
||
|
_gaq.push(['_trackPageview']);
|
||
|
(function() {
|
||
|
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||
|
})();
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|