ezcurl/0.2/ezcurl/Ezcurl/index.html
2021-10-08 10:26:30 -04:00

2 lines
No EOL
13 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Ezcurl (ezcurl.Ezcurl)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> <a href="../index.html">ezcurl</a> &#x00BB; Ezcurl</nav><h1>Module <code>Ezcurl</code></h1><h2 id="synchronous-api"><a href="#synchronous-api" class="anchor"></a>Synchronous API</h2></header><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <a href="../Ezcurl_core/index.html">Ezcurl_core</a></code></span></summary><div class="spec module" id="module-Config"><a href="#module-Config" class="anchor"></a><code><span class="keyword">module</span> Config = <a href="../Ezcurl_core/index.html#module-Config">Ezcurl_core.Config</a></code></div><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code><code> = Curl.t</code></dt></dl><dl><dt class="spec value" id="val-make"><a href="#val-make" class="anchor"></a><code><span class="keyword">val</span> make : <span>?&#8288;set_opts:<span>(<a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit)</span></span> <span>&#45;&gt;</span> unit <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-delete"><a href="#val-delete" class="anchor"></a><code><span class="keyword">val</span> delete : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-with_client"><a href="#val-with_client" class="anchor"></a><code><span class="keyword">val</span> with_client : <span>?&#8288;set_opts:<span>(<a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit)</span></span> <span>&#45;&gt;</span> <span>(<a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>Make a temporary client, call the function with it, then cleanup</p></dd></dl><dl><dt class="spec type" id="type-response_info"><a href="#type-response_info" class="anchor"></a><code><span class="keyword">type</span> response_info</code><code> = </code><code>{</code><table class="record"><tr id="type-response_info.ri_response_time" class="anchored"><td class="def field"><a href="#type-response_info.ri_response_time" class="anchor"></a><code>ri_response_time : float;</code></td></tr><tr id="type-response_info.ri_redirect_count" class="anchored"><td class="def field"><a href="#type-response_info.ri_redirect_count" class="anchor"></a><code>ri_redirect_count : int;</code></td></tr></table><code>}</code></dt></dl><dl><dt class="spec value" id="val-pp_response_info"><a href="#val-pp_response_info" class="anchor"></a><code><span class="keyword">val</span> pp_response_info : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-response_info">response_info</a> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-string_of_response_info"><a href="#val-string_of_response_info" class="anchor"></a><code><span class="keyword">val</span> string_of_response_info : <a href="index.html#type-response_info">response_info</a> <span>&#45;&gt;</span> string</code></dt></dl><dl><dt class="spec type" id="type-response"><a href="#type-response" class="anchor"></a><code><span class="keyword">type</span> response</code><code> = </code><code>{</code><table class="record"><tr id="type-response.code" class="anchored"><td class="def field"><a href="#type-response.code" class="anchor"></a><code>code : int;</code></td></tr><tr id="type-response.headers" class="anchored"><td class="def field"><a href="#type-response.headers" class="anchor"></a><code>headers : <span><span>(string * string)</span> list</span>;</code></td></tr><tr id="type-response.body" class="anchored"><td class="def field"><a href="#type-response.body" class="anchor"></a><code>body : string;</code></td></tr><tr id="type-response.info" class="anchored"><td class="def field"><a href="#type-response.info" class="anchor"></a><code>info : <a href="index.html#type-response_info">response_info</a>;</code></td></tr></table><code>}</code></dt></dl><dl><dt class="spec value" id="val-pp_response"><a href="#val-pp_response" class="anchor"></a><code><span class="keyword">val</span> pp_response : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-response">response</a> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-string_of_response"><a href="#val-string_of_response" class="anchor"></a><code><span class="keyword">val</span> string_of_response : <a href="index.html#type-response">response</a> <span>&#45;&gt;</span> string</code></dt></dl><dl><dt class="spec type" id="type-meth"><a href="#type-meth" class="anchor"></a><code><span class="keyword">type</span> meth</code><code> = </code><table class="variant"><tr id="type-meth.GET" class="anchored"><td class="def constructor"><a href="#type-meth.GET" class="anchor"></a><code>| </code><code><span class="constructor">GET</span></code></td></tr><tr id="type-meth.POST" class="anchored"><td class="def constructor"><a href="#type-meth.POST" class="anchor"></a><code>| </code><code><span class="constructor">POST</span> <span class="keyword">of</span> <span>Curl.curlHTTPPost list</span></code></td></tr><tr id="type-meth.PUT" class="anchored"><td class="def constructor"><a href="#type-meth.PUT" class="anchor"></a><code>| </code><code><span class="constructor">PUT</span></code></td></tr><tr id="type-meth.DELETE" class="anchored"><td class="def constructor"><a href="#type-meth.DELETE" class="anchor"></a><code>| </code><code><span class="constructor">DELETE</span></code></td></tr><tr id="type-meth.HEAD" class="anchored"><td class="def constructor"><a href="#type-meth.HEAD" class="anchor"></a><code>| </code><code><span class="constructor">HEAD</span></code></td></tr><tr id="type-meth.CONNECT" class="anchored"><td class="def constructor"><a href="#type-meth.CONNECT" class="anchor"></a><code>| </code><code><span class="constructor">CONNECT</span></code></td></tr><tr id="type-meth.OPTIONS" class="anchored"><td class="def constructor"><a href="#type-meth.OPTIONS" class="anchor"></a><code>| </code><code><span class="constructor">OPTIONS</span></code></td></tr><tr id="type-meth.TRACE" class="anchored"><td class="def constructor"><a href="#type-meth.TRACE" class="anchor"></a><code>| </code><code><span class="constructor">TRACE</span></code></td></tr><tr id="type-meth.PATCH" class="anchored"><td class="def constructor"><a href="#type-meth.PATCH" class="anchor"></a><code>| </code><code><span class="constructor">PATCH</span></code></td></tr></table></dt><dd><p>The <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods">HTTP method</a> to use</p></dd></dl><dl><dt class="spec value" id="val-pp_meth"><a href="#val-pp_meth" class="anchor"></a><code><span class="keyword">val</span> pp_meth : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-meth">meth</a> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-string_of_meth"><a href="#val-string_of_meth" class="anchor"></a><code><span class="keyword">val</span> string_of_meth : <a href="index.html#type-meth">meth</a> <span>&#45;&gt;</span> string</code></dt></dl><dl><dt class="spec module-type" id="module-type-IO"><a href="#module-type-IO" class="anchor"></a><code><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-IO/index.html">IO</a> = <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd></dd></dl><dl><dt class="spec module-type" id="module-type-S"><a href="#module-type-S" class="anchor"></a><code><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-S/index.html">S</a> = <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd></dd></dl><div class="spec module" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span class="keyword">module</span> Make = <a href="../Ezcurl_core/index.html#module-Make">Ezcurl_core.Make</a></code></div></details></div></div></div><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <span class="keyword">sig</span> ... <span class="keyword">end</span></code></span></summary><dl><dt class="spec type" id="type-io"><a href="#type-io" class="anchor"></a><code><span class="keyword">type</span> <span>'a io</span></code><code> = <span class="type-var">'a</span></code></dt></dl><dl><dt class="spec value" id="val-http"><a href="#val-http" class="anchor"></a><code><span class="keyword">val</span> http : <span>?&#8288;tries:int</span> <span>&#45;&gt;</span> <span>?&#8288;client:<a href="../Ezcurl_core/index.html#type-t">Ezcurl_core.t</a></span> <span>&#45;&gt;</span> <span>?&#8288;config:<a href="../Ezcurl_core/Config/index.html#type-t">Ezcurl_core.Config.t</a></span> <span>&#45;&gt;</span> <span>?&#8288;range:string</span> <span>&#45;&gt;</span> <span>?&#8288;content:<span>[ <span>`String of string</span> <span><span>| `Write</span> of bytes <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int</span> ]</span></span> <span>&#45;&gt;</span> <span>?&#8288;headers:<span><span>(string * string)</span> list</span></span> <span>&#45;&gt;</span> <span>url:string</span> <span>&#45;&gt;</span> <span>meth:<a href="../Ezcurl_core/index.html#type-meth">Ezcurl_core.meth</a></span> <span>&#45;&gt;</span> unit <span>&#45;&gt;</span> <span><span><span>(<a href="../Ezcurl_core/index.html#type-response">Ezcurl_core.response</a>, Curl.curlCode * string)</span> Stdlib.result</span> <a href="index.html#type-io">io</a></span></code></dt><dt class="spec value" id="val-get"><a href="#val-get" class="anchor"></a><code><span class="keyword">val</span> get : <span>?&#8288;tries:int</span> <span>&#45;&gt;</span> <span>?&#8288;client:<a href="../Ezcurl_core/index.html#type-t">Ezcurl_core.t</a></span> <span>&#45;&gt;</span> <span>?&#8288;config:<a href="../Ezcurl_core/Config/index.html#type-t">Ezcurl_core.Config.t</a></span> <span>&#45;&gt;</span> <span>?&#8288;range:string</span> <span>&#45;&gt;</span> <span>?&#8288;headers:<span><span>(string * string)</span> list</span></span> <span>&#45;&gt;</span> <span>url:string</span> <span>&#45;&gt;</span> unit <span>&#45;&gt;</span> <span><span><span>(<a href="../Ezcurl_core/index.html#type-response">Ezcurl_core.response</a>, Curl.curlCode * string)</span> Stdlib.result</span> <a href="index.html#type-io">io</a></span></code></dt><dt class="spec value" id="val-put"><a href="#val-put" class="anchor"></a><code><span class="keyword">val</span> put : <span>?&#8288;tries:int</span> <span>&#45;&gt;</span> <span>?&#8288;client:<a href="../Ezcurl_core/index.html#type-t">Ezcurl_core.t</a></span> <span>&#45;&gt;</span> <span>?&#8288;config:<a href="../Ezcurl_core/Config/index.html#type-t">Ezcurl_core.Config.t</a></span> <span>&#45;&gt;</span> <span>?&#8288;headers:<span><span>(string * string)</span> list</span></span> <span>&#45;&gt;</span> <span>url:string</span> <span>&#45;&gt;</span> <span>content:<span>[ <span>`String of string</span> <span><span>| `Write</span> of bytes <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int</span> ]</span></span> <span>&#45;&gt;</span> unit <span>&#45;&gt;</span> <span><span><span>(<a href="../Ezcurl_core/index.html#type-response">Ezcurl_core.response</a>, Curl.curlCode * string)</span> Stdlib.result</span> <a href="index.html#type-io">io</a></span></code></dt><dt class="spec value" id="val-post"><a href="#val-post" class="anchor"></a><code><span class="keyword">val</span> post : <span>?&#8288;tries:int</span> <span>&#45;&gt;</span> <span>?&#8288;client:<a href="../Ezcurl_core/index.html#type-t">Ezcurl_core.t</a></span> <span>&#45;&gt;</span> <span>?&#8288;config:<a href="../Ezcurl_core/Config/index.html#type-t">Ezcurl_core.Config.t</a></span> <span>&#45;&gt;</span> <span>?&#8288;headers:<span><span>(string * string)</span> list</span></span> <span>&#45;&gt;</span> <span>?&#8288;content:<span>[ <span>`String of string</span> <span><span>| `Write</span> of bytes <span>&#45;&gt;</span> int <span>&#45;&gt;</span> int</span> ]</span></span> <span>&#45;&gt;</span> <span>params:<span>Curl.curlHTTPPost list</span></span> <span>&#45;&gt;</span> <span>url:string</span> <span>&#45;&gt;</span> unit <span>&#45;&gt;</span> <span><span><span>(<a href="../Ezcurl_core/index.html#type-response">Ezcurl_core.response</a>, Curl.curlCode * string)</span> Stdlib.result</span> <a href="index.html#type-io">io</a></span></code></dt></dl></details></div></div></div></div></body></html>