<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="maxurl" module="max" category="Devices">
	<digest>
		Make HTTP requests
	</digest>
	<description>
		maxurl is a wrapper around libcurl that can perform HTTP requests. Use it to fetch and post web content.	For more information on curl please refer to the
		<a href="http://curl.haxx.se/docs/">
			Curl Docs Page.
		</a>
		To learn about and practice HTTP Requests, check out
		<a href="http://httpbin.org/">
			httpbin.org.
		</a>
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			TEXT_HERE
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Start an HTTP request (dictionary or message)
			</digest>
			<description>
				Initialize an HTTP request using a dictionary for more advanced features or a simple message starting with get, post, put or delete.
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Dictionary or Messages In
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Output dictionary
			</digest>
			<description>
				The output dictionary contains the http response status, body, etc.
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Progress info (list)
			</digest>
			<description>
				Progress info list with the name of the output dictionary (or 'progress' if unnamed), download total, download now, upload total, upload now. Note that not all HTTP servers send the download total header.
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="thread count" type="int" optional="1">
			<digest>
				Possible number of concurrent requests
			</digest>
			<description>
				If you would like maxurl to perform HTTP requests in sequence, then set the thread count to 1. If you would like to make multiple requests simultaneously, set the thread count to something greater than one. maxurl will then be able to execute that many requests concurrently. If you start maxurl with 3 threads and tell it to make 5 requests, 3 requests will be started immediately and 2 will be queued to start whenever any of the initial 3 requests finish.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="abort">
			<arglist>
				<arg name="response dictionary name" type="list" optional="1" />
			</arglist>
			<digest>
				Abort maxurl requests.
			</digest>
			<description>
				An abort message without any arguments will abort all running requests that this maxurl is performing. Optionally, a list of response dictionary names may be given to abort only those requests. To do the later, you will want to make your request with a specified response dictionary name. See the &quot;response_dict&quot; field of the dictionary message below.
			</description>
		</method>
		<method name="abortall">
			<arglist />
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="delete">
			<arglist>
				<arg name="url" type="list" optional="0" />
			</arglist>
			<digest>
				Sends an HTTP DELETE request
			</digest>
			<description>
				Sends an HTTP DELETE request to the specified URL.
			</description>
		</method>
		<method name="dictionary">
			<arglist>
				<arg name="name" type="symbol" optional="0" />
			</arglist>
			<digest>
				Dictionary input to set the HTTP request info
			</digest>
			<description>
				Dictionary input to perform a more advanced HTTP request.
				<table>
					<thead>
						<tr>
							<th>
								key name
							</th>
							<th>
								value
							</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td>
								response_dict
							</td>
							<td>
								(string) sets the response dictionary name
							</td>
						</tr>
						<tr>
							<td>
								url
							</td>
							<td>
								(string) sets the url to which maxurl should make a request. (e.g. &quot;http://cycling74.com&quot; )
							</td>
						</tr>
						<tr>
							<td>
								http_method
							</td>
							<td>
								(string) one of four options:  &quot;get&quot;, &quot;post&quot;, &quot;put&quot;, or &quot;delete&quot;
							</td>
						</tr>
						<tr>
							<td>
								post_data
							</td>
							<td>
								<p>
									(string) a url encoded string containing your post variables (e.g. &quot;key1=val1&amp;key2=val2&quot;)
								</p>
								<p>
									(dictionary) If post_data is another dictionary, maxurl will encode the dictionary as json data in the post body.
								</p>
							</td>
						</tr>
						<tr>
							<td>
								filename_out
							</td>
							<td>
								(string) full path name of your output file. If this is set, the &quot;body&quot; key of the response dictionary will be empty.
							</td>
						</tr>
						<tr>
							<td>
								filename_in
							</td>
							<td>
								(string) full path name of your input filen. If this is set, and http_method is &quot;put&quot; or &quot;post&quot;, maxurl will read this file as the body of your http request. Use this or the 'multiput_form' field to upload files to a server.
							</td>
						</tr>
						<tr>
							<td>
								useragent
							</td>
							<td>
								(string) the user agent name for your request. Use this to spoof other browsers. By default maxurl declares itself as Firefox on windows.
							</td>
						</tr>
						<tr>
							<td>
								timeout
							</td>
							<td>
								(number) set the timeout length in seconds. NOTE! This will terminate a running connection if it takes longer than the set timeout length.
							</td>
						</tr>
						<tr>
							<td>
								connect_timeout
							</td>
							<td>
								(number) set the timeout length in seconds for making a connection to a remote host.
							</td>
						</tr>
						<tr>
							<td>
								parse_type
							</td>
							<td>
								(string) one of either &quot;none&quot;, &quot;json&quot; or &quot;xml&quot;. Default is &quot;none&quot;. If set to &quot;json&quot; or &quot;xml&quot;, maxurl will respectively try to parse the response data into a dict from json or xml data.
							</td>
						</tr>
						<tr>
							<td>
								headers
							</td>
							<td>
								(array of strings) set the request headers directly (e.g [&quot;Content-Type=text/plain; charset=UTF-8&quot;, &quot;Server=httpbin&quot;]).
							</td>
						</tr>
						<tr>
							<td>
								cookie
							</td>
							<td>
								(string) cookies are accepted and shared among requests in a maxurl object. However, you may set the request cookie directly here with something like  'name1=value1;name2=value2;'
							</td>
						</tr>
						<tr>
							<td>
								http_auth
							</td>
							<td>
								(string) set the http authentication to be sent with &quot;username:password&quot;. By default, maxurl will attempt all authentication methods (basic, digest, gss negotiate, ntlm)
							</td>
						</tr>
						<tr>
							<td>
								multipart_form
							</td>
							<td>
								(array of dictionaries or dictionary or dictionaries) individual parts should have 2-3 keys, &quot;name&quot;, &quot;file&quot;, &quot;content&quot;, or &quot;contenttype&quot;. eg:
								<code>
									<pre>
										[ {&quot;name&quot;:&quot;file-0&quot;, &quot;file&quot;: &quot;/full/path/to/filename.jpg&quot;}, {&quot;name&quot;: &quot;file-1&quot;, &quot;file&quot;: &quot;/full/path/to/filename2.jpg&quot;}, {&quot;name&quot;: &quot;filecount&quot;, &quot;content&quot;: &quot;2&quot; } ] OR: { &quot;part1&quot; : {&quot;name&quot;:&quot;myfirstfile&quot;, &quot;file&quot;: &quot;/full/path/to/filename.jpg&quot;}, &quot;part2&quot; : {&quot;name&quot;: &quot;anotherfile&quot;, &quot;file&quot;: &quot;/full/path/to/filename2.jpg&quot;}, &quot;part3&quot; : {&quot;name&quot;: &quot;filecount&quot;, &quot;content&quot;: &quot;2&quot; } }
									</pre>
								</code>
							</td>
						</tr>
						<tr>
							<td>
								overwrite_response_dict
							</td>
							<td>
								(long) Either 0 or 1. If set to 1 (default) maxurl will allow you to make multiple requests that return data in the same response dictionary. If set to 0, maxurl will not allow you to queue your request if there already exists a running or queued request with the same response dictionary.
							</td>
						</tr>
						<tr>
							<td>
								overwrite_output_file
							</td>
							<td>
								(long) Either 0 or 1. By default this is set to 0 and maxurl will not overwite output files. If set to 1, you can force maxurl to overwrite an output file. If there is a running request that is writing data to that filename, it will be aborted.
							</td>
						</tr>
						<tr>
							<td>
								proxy
							</td>
							<td>
								(string)  Set a proxy server.
							</td>
						</tr>
						<tr>
							<td>
								proxy_type
							</td>
							<td>
								(string)  Either http (default), socks4, socks4a, or socks5
							</td>
						</tr>
						<tr>
							<td>
								proxy_auth
							</td>
							<td>
								(string)  If your proxy requires a password set this to &quot;username:password&quot;
							</td>
						</tr>
					</tbody>
				</table>
			</description>
		</method>
		<method name="get">
			<arglist>
				<arg name="url" type="list" optional="0" />
			</arglist>
			<digest>
				Sends an HTTP GET request
			</digest>
			<description>
				Sends an HTTP GET request to the specified URL.
			</description>
		</method>
		<method name="post">
			<arglist>
				<arg name="url" type="list" optional="0" />
			</arglist>
			<digest>
				Sends an HTTP POST request
			</digest>
			<description>
				Sends an HTTP POST request to the specified URL.  Any pairs of symbols following the url will be sent as key-value pairs in the url encoded form.
			</description>
		</method>
		<method name="put">
			<arglist>
				<arg name="url" type="list" optional="0" />
			</arglist>
			<digest>
				Sends an HTTP PUT request
			</digest>
			<description>
				Sends an HTTP PUT request to the specified URL.  Any pairs of symbols following the url will be sent as key-value pairs in the url encoded form.
			</description>
		</method>
		<method name="verbosity">
			<arglist>
				<arg name="ARG_NAME_0" type="int" optional="0" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="maxurl.png" caption="HTTP methods GET and POST" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="jit.net.recv" />
		<seealso name="jit.net.send" />
		<seealso name="jit.uldl" />
		<seealso name="jweb" />
		<seealso name="udpreceive" />
		<seealso name="udpsend" />
	</seealsolist>
</c74object>
