mirror of
https://github.com/correl/urilib.git
synced 2025-03-17 17:00:13 -09:00
Add edoc output to readme
This commit is contained in:
parent
7b05c0c2b5
commit
a00f82c953
2 changed files with 106 additions and 3 deletions
105
README.md
105
README.md
|
@ -2,7 +2,110 @@ urilib
|
|||
======
|
||||
[RFC-3986](https://tools.ietf.org/html/rfc3986) URI Library for Erlang.
|
||||
|
||||
[](https://travis-ci.org/gmr/urilib)
|
||||
|
||||
API
|
||||
---
|
||||
|
||||
[](https://travis-ci.org/gmr/urilib)
|
||||
<a name="index"></a>
|
||||
|
||||
## Function Index ##
|
||||
|
||||
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#build-1">build/1</a></td><td>Returns a URI from the record passed in.</td></tr><tr><td valign="top"><a href="#decode-1">decode/1</a></td><td>Decode a percent encoded string value.</td></tr><tr><td valign="top"><a href="#decode_plus-1">decode_plus/1</a></td><td>Decode a percent encoded string value that uses pluses for spaces.</td></tr><tr><td valign="top"><a href="#encode-1">encode/1</a></td><td>Percent encode a string value.</td></tr><tr><td valign="top"><a href="#encode_plus-1">encode_plus/1</a></td><td>Percent encode a string value similar to encode/1, but encodes spaces with a
|
||||
plus (+) instead of %20.</td></tr><tr><td valign="top"><a href="#parse_uri-1">parse_uri/1</a></td><td>Parse a URI string returning the parsed data as a record.</td></tr><tr><td valign="top"><a href="#parse_url-1">parse_url/1</a></td><td>Parse a URL string returning the parsed data as a record.</td></tr></table>
|
||||
|
||||
<a name="functions"></a>
|
||||
|
||||
## Function Details ##
|
||||
|
||||
<a name="build-1"></a>
|
||||
|
||||
### build/1 ###
|
||||
|
||||
<pre><code>
|
||||
build(Uri::Value) -> URI
|
||||
</code></pre>
|
||||
|
||||
<ul class="definitions"><li><code>Value = #uri{} | #url{}</code></li><li><code>URI = string()</code></li></ul>
|
||||
|
||||
Returns a URI from the record passed in.
|
||||
|
||||
<a name="decode-1"></a>
|
||||
|
||||
### decode/1 ###
|
||||
|
||||
<pre><code>
|
||||
decode(Value) -> DecodedValue
|
||||
</code></pre>
|
||||
|
||||
<ul class="definitions"><li><code>Value = string()</code></li><li><code>DecodeValue = string()</code></li></ul>
|
||||
|
||||
Decode a percent encoded string value.
|
||||
|
||||
<a name="decode_plus-1"></a>
|
||||
|
||||
### decode_plus/1 ###
|
||||
|
||||
<pre><code>
|
||||
decode_plus(Value) -> DecodedValue
|
||||
</code></pre>
|
||||
|
||||
<ul class="definitions"><li><code>Value = string()</code></li><li><code>DecodeValue = string()</code></li></ul>
|
||||
|
||||
Decode a percent encoded string value that uses pluses for spaces.
|
||||
|
||||
Note: The use of plus for space is defined in RFC-1630 but does not appear
|
||||
in RFC-3986.
|
||||
|
||||
<a name="encode-1"></a>
|
||||
|
||||
### encode/1 ###
|
||||
|
||||
<pre><code>
|
||||
encode(Value) -> EncodedValue
|
||||
</code></pre>
|
||||
|
||||
<ul class="definitions"><li><code>Value = string()</code></li><li><code>EncodedValue = string()</code></li></ul>
|
||||
|
||||
Percent encode a string value.
|
||||
|
||||
<a name="encode_plus-1"></a>
|
||||
|
||||
### encode_plus/1 ###
|
||||
|
||||
<pre><code>
|
||||
encode_plus(Value) -> EncodedValue
|
||||
</code></pre>
|
||||
|
||||
<ul class="definitions"><li><code>Value = string()</code></li><li><code>EncodedValue = string()</code></li></ul>
|
||||
|
||||
Percent encode a string value similar to encode/1, but encodes spaces with a
|
||||
plus (+) instead of %20. This function can be used for encoding query arguments.
|
||||
|
||||
Note: The use of plus for space is defined in RFC-1630 but does not appear
|
||||
in RFC-3986.
|
||||
|
||||
<a name="parse_uri-1"></a>
|
||||
|
||||
### parse_uri/1 ###
|
||||
|
||||
<pre><code>
|
||||
parse_uri(URI) -> ParsedURI
|
||||
</code></pre>
|
||||
|
||||
<ul class="definitions"><li><code>URI = string()</code></li><li><code>ParsedURI = #uri{}</code></li></ul>
|
||||
|
||||
Parse a URI string returning the parsed data as a record
|
||||
|
||||
<a name="parse_url-1"></a>
|
||||
|
||||
### parse_url/1 ###
|
||||
|
||||
<pre><code>
|
||||
parse_url(URL) -> ParsedURL
|
||||
</code></pre>
|
||||
|
||||
<ul class="definitions"><li><code>URI = string()</code></li><li><code>ParsedURL = #url{}</code></li></ul>
|
||||
|
||||
Parse a URL string returning the parsed data as a record
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ build(#uri{scheme=Scheme, userinfo=UserInfo, authority=Authority,
|
|||
|
||||
|
||||
-spec parse_uri(string()) -> #uri{}.
|
||||
%% @spec parse_uri(URI) -> ParsedURI.
|
||||
%% @spec parse_uri(URI) -> ParsedURI
|
||||
%% where
|
||||
%% URI = string()
|
||||
%% ParsedURI = #uri{}
|
||||
|
@ -63,7 +63,7 @@ parse_uri(URI) ->
|
|||
|
||||
|
||||
-spec parse_url(string()) -> #url{}.
|
||||
%% @spec parse_url(URL) -> ParsedURL.
|
||||
%% @spec parse_url(URL) -> ParsedURL
|
||||
%% where
|
||||
%% URI = string()
|
||||
%% ParsedURL = #url{}
|
||||
|
|
Loading…
Add table
Reference in a new issue