Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > 10b6c61f9c52cf0a3e5159f5165385d8 > files > 18

ocaml-uri-devel-1.3.8-4.mga5.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="next" href="Uri_re.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Uri" rel="Chapter" href="Uri.html">
<link title="Uri_re" rel="Chapter" href="Uri_re.html">
<link title="Uri_IP" rel="Chapter" href="Uri_IP.html"><title>Uri</title>
</head>
<body>
<div class="navbar">&nbsp;<a class="up" href="index.html" title="Index">Up</a>
&nbsp;<a class="post" href="Uri_re.html" title="Uri_re">Next</a>
</div>
<h1>Module <a href="type_Uri.html">Uri</a></h1>

<pre><span class="keyword">module</span> Uri: <code class="code">sig</code> <a href="Uri.html">..</a> <code class="code">end</code></pre><div class="info module top">
Uniform Resource Identifier handling that is RFC3986-compliant.<br>
</div>
<hr width="100%">

<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre>
<div class="info ">
A single URI that is a compact sequence of characters that identifies
    an abstract or physical resource.<br>
</div>


<pre><span id="TYPEcomponent"><span class="keyword">type</span> <code class="type"></code>component</span> = <code class="type">[ `Authority<br>       | `Fragment<br>       | `Host<br>       | `Path<br>       | `Query<br>       | `Query_key<br>       | `Query_value<br>       | `Scheme<br>       | `Userinfo ]</code> </pre>


<pre><span id="VALpct_encode"><span class="keyword">val</span> pct_encode</span> : <code class="type">?scheme:string -> ?component:<a href="Uri.html#TYPEcomponent">component</a> -> string -> string</code></pre><div class="info ">
Percent-encode a string. The <code class="code">scheme</code> argument defaults to 'http' and
    the <code class="code">component</code> argument defaults to `Path<br>
</div>

<pre><span id="VALpct_decode"><span class="keyword">val</span> pct_decode</span> : <code class="type">string -> string</code></pre><div class="info ">
Percent-decode a percent-encoded string<br>
</div>

<pre><span id="VALof_string"><span class="keyword">val</span> of_string</span> : <code class="type">string -> <a href="Uri.html#TYPEt">t</a></code></pre><div class="info ">
Convert a percent-encoded string into a URI structure<br>
</div>

<pre><span id="VALto_string"><span class="keyword">val</span> to_string</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> string</code></pre><div class="info ">
Convert a URI structure into a percent-encoded URI string<br>
</div>

<pre><span id="VALresolve"><span class="keyword">val</span> resolve</span> : <code class="type">string -> <a href="Uri.html#TYPEt">t</a> -> <a href="Uri.html#TYPEt">t</a> -> <a href="Uri.html#TYPEt">t</a></code></pre><div class="info ">
Resolve a URI against a default scheme and base URI<br>
</div>

<pre><span id="VALquery"><span class="keyword">val</span> query</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> (string * string list) list</code></pre><div class="info ">
Get a query string from a URI<br>
</div>

<pre><span id="VALencoded_of_query"><span class="keyword">val</span> encoded_of_query</span> : <code class="type">(string * string list) list -> string</code></pre><div class="info ">
Make a percent-encoded query string from percent-decoded query tuple<br>
</div>

<pre><span id="VALquery_of_encoded"><span class="keyword">val</span> query_of_encoded</span> : <code class="type">string -> (string * string list) list</code></pre><div class="info ">
Parse a percent-encoded query string into a percent-decoded query tuple<br>
</div>

<pre><span id="VALwith_query"><span class="keyword">val</span> with_query</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> (string * string list) list -> <a href="Uri.html#TYPEt">t</a></code></pre><div class="info ">
Replace the query URI with the supplied list.
    Input URI is not modified<br>
</div>

<pre><span id="VALwith_query'"><span class="keyword">val</span> with_query'</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> (string * string) list -> <a href="Uri.html#TYPEt">t</a></code></pre><div class="info ">
Replace the query URI with the supplied singleton query list.
    Input URI is not modified<br>
</div>

<pre><span id="VALget_query_param'"><span class="keyword">val</span> get_query_param'</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> string -> string list option</code></pre><div class="info ">
<code class="code">get_query_param' q key</code> returns the list of values for the
    <code class="code">key</code> parameter in query <code class="code">q</code>.  Note that an empty list is not the
    same as a <code class="code">None</code> return value.  For a query <code class="code">foo</code>, the mapping is:<ul>
<li><code class="code">/</code> returns None</li>
<li><code class="code">/?foo</code> returns Some []</li>
<li><code class="code">/?foo=</code> returns <code class="code">Some [""]</code></li>
<li><code class="code">/?foo=bar</code> returns <code class="code">Some ["bar"]</code></li>
<li><code class="code">/?foo=bar,chi</code> returns <code class="code">Some ["bar","chi"]</code></li>
</ul>

    Query keys can be duplicated in the URI, in which case the first
    one is returned.  If you want to resolve duplicate keys, obtain
    the full result set with <a href="Uri.html#VALquery"><code class="code">Uri.query</code></a> instead.<br>
</div>

<pre><span id="VALget_query_param"><span class="keyword">val</span> get_query_param</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> string -> string option</code></pre><div class="info ">
<code class="code">get_query_param q key</code> returns the value found for a <code class="code">key</code> in
     query <code class="code">q</code>.  If there are multiple values for the key, then the
     first one is returned/<br>
</div>

<pre><span id="VALadd_query_param"><span class="keyword">val</span> add_query_param</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> string * string list -> <a href="Uri.html#TYPEt">t</a></code></pre><div class="info ">
Add a query parameter to the input query URI.
    Input URI is not modified<br>
</div>

<pre><span id="VALadd_query_param'"><span class="keyword">val</span> add_query_param'</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> string * string -> <a href="Uri.html#TYPEt">t</a></code></pre><div class="info ">
Add a query parameter to the input singleton query URI.
    Input URI is not modified<br>
</div>

<pre><span id="VALadd_query_params"><span class="keyword">val</span> add_query_params</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> (string * string list) list -> <a href="Uri.html#TYPEt">t</a></code></pre><div class="info ">
Add a query parameter list to the input query URI.
    Input URI is not modified<br>
</div>

<pre><span id="VALadd_query_params'"><span class="keyword">val</span> add_query_params'</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> (string * string) list -> <a href="Uri.html#TYPEt">t</a></code></pre><div class="info ">
Add a query singleton parameter list to the input query URI.
    Input URI is not modified<br>
</div>

<pre><span id="VALremove_query_param"><span class="keyword">val</span> remove_query_param</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> string -> <a href="Uri.html#TYPEt">t</a></code></pre><div class="info ">
Remove a query key from the input query URI.
    Input URI is not modified, and no error is generated if the
    key does not already exist in the URI.<br>
</div>

<pre><span id="VALmake"><span class="keyword">val</span> make</span> : <code class="type">?scheme:string -><br>       ?userinfo:string -><br>       ?host:string -><br>       ?port:int -><br>       ?path:string -><br>       ?query:(string * string list) list -> ?fragment:string -> unit -> <a href="Uri.html#TYPEt">t</a></code></pre>
<pre><span id="VALpath"><span class="keyword">val</span> path</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> string</code></pre><div class="info ">
Get the path component of a URI<br>
</div>

<pre><span id="VALpath_and_query"><span class="keyword">val</span> path_and_query</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> string</code></pre><div class="info ">
Get the path and query components of a URI<br>
</div>

<pre><span id="VALwith_path"><span class="keyword">val</span> with_path</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> string -> <a href="Uri.html#TYPEt">t</a></code></pre><div class="info ">
Replace the path URI with the supplied path.
  * Input URI is not modified<br>
</div>

<pre><span id="VALscheme"><span class="keyword">val</span> scheme</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> string option</code></pre><div class="info ">
Get the scheme component of a URI<br>
</div>

<pre><span id="VALuserinfo"><span class="keyword">val</span> userinfo</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> string option</code></pre><div class="info ">
Get the userinfo component of a URI<br>
</div>

<pre><span id="VALhost"><span class="keyword">val</span> host</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> string option</code></pre><div class="info ">
Get the host component of a URI<br>
</div>

<pre><span id="VALwith_host"><span class="keyword">val</span> with_host</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> string option -> <a href="Uri.html#TYPEt">t</a></code></pre><div class="info ">
Replace the host component of the URI.
    Input URI is not modified.<br>
</div>

<pre><span id="VALhost_with_default"><span class="keyword">val</span> host_with_default</span> : <code class="type">?default:string -> <a href="Uri.html#TYPEt">t</a> -> string</code></pre><div class="info ">
Get the host component of a URI, with a default
  * supplied if one is not present<br>
</div>

<pre><span id="VALport"><span class="keyword">val</span> port</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> int option</code></pre><div class="info ">
Get the port component of a URI<br>
</div>

<pre><span id="VALwith_port"><span class="keyword">val</span> with_port</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> int option -> <a href="Uri.html#TYPEt">t</a></code></pre><div class="info ">
Replace the port component of the URI with the supplied port.
    Input URI is not modified<br>
</div>

<pre><span id="VALfragment"><span class="keyword">val</span> fragment</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> string option</code></pre><div class="info ">
Get the fragment component of a URI<br>
</div>

<pre><span id="VALwith_fragment"><span class="keyword">val</span> with_fragment</span> : <code class="type"><a href="Uri.html#TYPEt">t</a> -> string option -> <a href="Uri.html#TYPEt">t</a></code></pre><div class="info ">
Replace the fragment component of a URI with the supplied fragment.
    Input URI is not modified<br>
</div>

<pre><span id="VALpp_hum"><span class="keyword">val</span> pp_hum</span> : <code class="type">Format.formatter -> <a href="Uri.html#TYPEt">t</a> -> unit</code></pre></body></html>