Skip to content

Commit aa41e75

Browse files
committed
bump to 1.14.0
1 parent 63f1d15 commit aa41e75

10 files changed

+89
-17
lines changed

NEWS.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# NEWS
22

3+
1.14.0 - 2018-09-12
4+
-------------------
5+
6+
- bump to certifi 2.4.2
7+
- bump to idna 0.6.0
8+
- fix support of rebar2
9+
- fix specs
10+
- add `hackney:sockname/1` adn `hackney:peername/1` functions
11+
- add new `checkout_timeout` option for clarity
12+
- improve `hackney_url:parse_qs/1` to trim leading and trailing empty values
13+
14+
315
1.13.0 - 2018-06-22
416
-------------------
517

README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Copyright (c) 2012-2018 Benoît Chesneau.
66

7-
__Version:__ 1.13.0
7+
__Version:__ 1.14.0
88

99
# hackney
1010

@@ -196,7 +196,6 @@ Options = [],
196196
> To create a connection that will use an HTTP proxy use
197197
> `hackney_http_proxy:connect_proxy/5` instead.
198198
199-
200199
#### To get local and remote ip and port information of a connection:
201200

202201
```erlang
@@ -212,12 +211,12 @@ to make a request:
212211

213212
```erlang
214213

215-
ReqBody = << "{\"snippet\": \"some snippet\"}" >>,
214+
ReqBody = << "{ \"snippet\": \"some snippet\" }" >>,
216215
ReqHeaders = [{<<"Content-Type">>, <<"application/json">>}],
217216
NextPath = <<"/">>,
218217
NextMethod = post,
219218
NextReq = {NextMethod, NextPath, ReqHeaders, ReqBody},
220-
{ok, _, _, ConnRef} = hackney:send_request(ConnRef, NextReq).
219+
{ok, _, _, ConnRef} = hackney:send_request(ConnRef, NextReq),
221220
{ok, Body1} = hackney:body(ConnRef).
222221
```
223222

doc/README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Copyright (c) 2012-2018 Benoît Chesneau.
66

7-
__Version:__ 1.13.0
7+
__Version:__ 1.14.0
88

99
# hackney
1010

@@ -196,7 +196,6 @@ Options = [],
196196
> To create a connection that will use an HTTP proxy use
197197
> `hackney_http_proxy:connect_proxy/5` instead.
198198
199-
200199
#### To get local and remote ip and port information of a connection:
201200

202201
```erlang
@@ -217,7 +216,7 @@ ReqHeaders = [{<<"Content-Type">>, <<"application/json">>}],
217216
NextPath = <<"/">>,
218217
NextMethod = post,
219218
NextReq = {NextMethod, NextPath, ReqHeaders, ReqBody},
220-
{ok, _, _, ConnRef} = hackney:send_request(ConnRef, NextReq).
219+
{ok, _, _, ConnRef} = hackney:send_request(ConnRef, NextReq),
221220
{ok, Body1} = hackney:body(ConnRef).
222221
```
223222

doc/hackney.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
### <a name="type-client">client()</a> ###
1616

1717

18-
__abstract datatype__: `client()`
18+
<pre><code>
19+
client() = #client{}
20+
</code></pre>
1921

2022

2123

@@ -351,6 +353,9 @@ redirection even on POST
351353
* `insecure`: to perform "insecure" SSL connections and
352354
transfers without checking the certificate
353355

356+
* `{checkout_timeout, infinity | integer()}`: timeout used when
357+
checking out a socket from the pool, in milliseconds. Default is 8000
358+
354359
* `{connect_timeout, infinity | integer()}`: timeout used when
355360
establishing a connection, in milliseconds. Default is 8000
356361

doc/hackney_bstr.md

+36-1
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,40 @@
11

22

33
# Module hackney_bstr #
4+
* [Data Types](#types)
45
* [Function Index](#index)
56
* [Function Details](#functions)
67

8+
<a name="types"></a>
9+
10+
## Data Types ##
11+
12+
13+
14+
15+
### <a name="type-cp">cp()</a> ###
16+
17+
18+
__abstract datatype__: `cp()`
19+
20+
21+
22+
23+
### <a name="type-part">part()</a> ###
24+
25+
26+
<pre><code>
27+
part() = {Start::non_neg_integer(), Length::integer()}
28+
</code></pre>
29+
30+
END: Remove when OTP 17 not officially supported
31+
732
<a name="index"></a>
833

934
## Function Index ##
1035

1136

12-
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#alpha-2">alpha/2</a></td><td>Parse a list of case-insensitive alpha characters.</td></tr><tr><td valign="top"><a href="#char_to_lower-1">char_to_lower/1</a></td><td>Convert [A-Z] characters to lowercase.</td></tr><tr><td valign="top"><a href="#char_to_upper-1">char_to_upper/1</a></td><td>Convert [a-z] characters to uppercase.</td></tr><tr><td valign="top"><a href="#digits-1">digits/1</a></td><td>Parse a list of digits as a non negative integer.</td></tr><tr><td valign="top"><a href="#digits-2">digits/2</a></td><td></td></tr><tr><td valign="top"><a href="#digits-3">digits/3</a></td><td></td></tr><tr><td valign="top"><a href="#join-2">join/2</a></td><td></td></tr><tr><td valign="top"><a href="#list-2">list/2</a></td><td>Parse a list of the given type.</td></tr><tr><td valign="top"><a href="#nonempty_list-2">nonempty_list/2</a></td><td>Parse a non-empty list of the given type.</td></tr><tr><td valign="top"><a href="#parameterized_tokens-1">parameterized_tokens/1</a></td><td>Parse a non empty list of tokens followed with optional parameters.</td></tr><tr><td valign="top"><a href="#params-2">params/2</a></td><td>Parse a list of parameters (a=b;c=d).</td></tr><tr><td valign="top"><a href="#quoted_string-2">quoted_string/2</a></td><td></td></tr><tr><td valign="top"><a href="#to_binary-1">to_binary/1</a></td><td></td></tr><tr><td valign="top"><a href="#to_hex-1">to_hex/1</a></td><td></td></tr><tr><td valign="top"><a href="#to_lower-1">to_lower/1</a></td><td>Convert a binary string to lowercase.</td></tr><tr><td valign="top"><a href="#to_upper-1">to_upper/1</a></td><td></td></tr><tr><td valign="top"><a href="#token-2">token/2</a></td><td>Parse a token.</td></tr><tr><td valign="top"><a href="#token_ci-2">token_ci/2</a></td><td>Parse a case-insensitive token.</td></tr><tr><td valign="top"><a href="#trim-1">trim/1</a></td><td></td></tr><tr><td valign="top"><a href="#whitespace-2">whitespace/2</a></td><td>Skip whitespace.</td></tr><tr><td valign="top"><a href="#word-2">word/2</a></td><td>Parse either a token or a quoted string.</td></tr></table>
37+
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#alpha-2">alpha/2</a></td><td>Parse a list of case-insensitive alpha characters.</td></tr><tr><td valign="top"><a href="#char_to_lower-1">char_to_lower/1</a></td><td>Convert [A-Z] characters to lowercase.</td></tr><tr><td valign="top"><a href="#char_to_upper-1">char_to_upper/1</a></td><td>Convert [a-z] characters to uppercase.</td></tr><tr><td valign="top"><a href="#digits-1">digits/1</a></td><td>Parse a list of digits as a non negative integer.</td></tr><tr><td valign="top"><a href="#digits-2">digits/2</a></td><td></td></tr><tr><td valign="top"><a href="#digits-3">digits/3</a></td><td></td></tr><tr><td valign="top"><a href="#join-2">join/2</a></td><td></td></tr><tr><td valign="top"><a href="#list-2">list/2</a></td><td>Parse a list of the given type.</td></tr><tr><td valign="top"><a href="#nonempty_list-2">nonempty_list/2</a></td><td>Parse a non-empty list of the given type.</td></tr><tr><td valign="top"><a href="#parameterized_tokens-1">parameterized_tokens/1</a></td><td>Parse a non empty list of tokens followed with optional parameters.</td></tr><tr><td valign="top"><a href="#params-2">params/2</a></td><td>Parse a list of parameters (a=b;c=d).</td></tr><tr><td valign="top"><a href="#quoted_string-2">quoted_string/2</a></td><td></td></tr><tr><td valign="top"><a href="#split-3">split/3</a></td><td></td></tr><tr><td valign="top"><a href="#to_binary-1">to_binary/1</a></td><td></td></tr><tr><td valign="top"><a href="#to_hex-1">to_hex/1</a></td><td></td></tr><tr><td valign="top"><a href="#to_lower-1">to_lower/1</a></td><td>Convert a binary string to lowercase.</td></tr><tr><td valign="top"><a href="#to_upper-1">to_upper/1</a></td><td></td></tr><tr><td valign="top"><a href="#token-2">token/2</a></td><td>Parse a token.</td></tr><tr><td valign="top"><a href="#token_ci-2">token_ci/2</a></td><td>Parse a case-insensitive token.</td></tr><tr><td valign="top"><a href="#trim-1">trim/1</a></td><td></td></tr><tr><td valign="top"><a href="#whitespace-2">whitespace/2</a></td><td>Skip whitespace.</td></tr><tr><td valign="top"><a href="#word-2">word/2</a></td><td>Parse either a token or a quoted string.</td></tr></table>
1338

1439

1540
<a name="functions"></a>
@@ -139,6 +164,16 @@ quoted_string(X1::binary(), Fun::function()) -&gt; any()
139164
</code></pre>
140165
<br />
141166

167+
<a name="split-3"></a>
168+
169+
### split/3 ###
170+
171+
<pre><code>
172+
split(Subject, Pattern, Options) -&gt; Parts
173+
</code></pre>
174+
175+
<ul class="definitions"><li><code>Subject = binary()</code></li><li><code>Pattern = binary() | [binary()] | <a href="#type-cp">cp()</a></code></li><li><code>Options = [Option]</code></li><li><code>Option = {scope, <a href="#type-part">part()</a>} | trim | global | trim_all</code></li><li><code>Parts = [binary()]</code></li></ul>
176+
142177
<a name="to_binary-1"></a>
143178

144179
### to_binary/1 ###

doc/hackney_http.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,17 @@ given correpond to the non parsed part of the internal buffer.
6565

6666

6767
<pre><code>
68-
body_result() = {more, <a href="#type-parser">parser()</a>, binary()} | {ok, binary(), <a href="#type-parser">parser()</a>} | {done, binary()}
68+
body_result() = {more, <a href="#type-parser">parser()</a>, binary()} | {ok, binary(), <a href="#type-parser">parser()</a>} | {done, binary()} | done
69+
</code></pre>
70+
71+
72+
73+
74+
### <a name="type-header_result">header_result()</a> ###
75+
76+
77+
<pre><code>
78+
header_result() = {headers_complete, <a href="#type-parser">parser()</a>} | {header, {binary(), binary()}, <a href="#type-parser">parser()</a>}
6979
</code></pre>
7080

7181

@@ -104,7 +114,9 @@ http_version() = {integer(), integer()}
104114
### <a name="type-parser">parser()</a> ###
105115

106116

107-
__abstract datatype__: `parser()`
117+
<pre><code>
118+
parser() = #hparser{}
119+
</code></pre>
108120

109121

110122

@@ -133,7 +145,7 @@ parser_options() = [<a href="#type-parser_option">parser_option()</a>]
133145

134146

135147
<pre><code>
136-
parser_result() = {response, <a href="#type-http_version">http_version()</a>, <a href="#type-status">status()</a>, <a href="#type-http_reason">http_reason()</a>, <a href="#type-parser">parser()</a>} | {request, <a href="#type-http_version">http_version()</a>, <a href="#type-http_method">http_method()</a>, <a href="#type-uri">uri()</a>, <a href="#type-parser">parser()</a>} | {more, <a href="#type-parser">parser()</a>} | <a href="#type-body_result">body_result()</a> | {error, term()}
148+
parser_result() = {response, <a href="#type-http_version">http_version()</a>, <a href="#type-status">status()</a>, <a href="#type-http_reason">http_reason()</a>, <a href="#type-parser">parser()</a>} | {request, <a href="#type-http_method">http_method()</a>, <a href="#type-uri">uri()</a>, <a href="#type-http_version">http_version()</a>, <a href="#type-parser">parser()</a>} | {more, <a href="#type-parser">parser()</a>} | <a href="#type-header_result">header_result()</a> | <a href="#type-body_result">body_result()</a> | {error, term()}
137149
</code></pre>
138150

139151

doc/hackney_response.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ handle Expect header
9090
### skip_body/1 ###
9191

9292
<pre><code>
93-
skip_body(Client::#client{}) -&gt; {ok, #client{}} | {error, atom()}
93+
skip_body(Client::#client{}) -&gt; {ok, #client{}} | {skip, #client{}} | {error, atom()}
9494
</code></pre>
9595
<br />
9696

doc/hackney_url.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ module to manage urls.
1515

1616

1717

18+
### <a name="type-qs_opt">qs_opt()</a> ###
19+
20+
21+
<pre><code>
22+
qs_opt() = noplus | upper
23+
</code></pre>
24+
25+
26+
27+
1828
### <a name="type-qs_vals">qs_vals()</a> ###
1929

2030

@@ -129,7 +139,7 @@ encode query properties to binary
129139
### qs/2 ###
130140

131141
<pre><code>
132-
qs(KVs::<a href="#type-qs_vals">qs_vals()</a>, Opts::[atom]) -&gt; binary()
142+
qs(KVs::<a href="#type-qs_vals">qs_vals()</a>, Opts::[<a href="#type-qs_opt">qs_opt()</a>]) -&gt; binary()
133143
</code></pre>
134144
<br />
135145

@@ -191,7 +201,7 @@ URL encode a string binary.
191201
### urlencode/2 ###
192202

193203
<pre><code>
194-
urlencode(Bin::binary() | string(), Opts::[noplus | upper]) -&gt; binary()
204+
urlencode(Bin::binary() | string(), Opts::[<a href="#type-qs_opt">qs_opt()</a>]) -&gt; binary()
195205
</code></pre>
196206
<br />
197207

doc/overview.edoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
@copyright 2012-2018 Benoît Chesneau.
20-
@version 1.13.0
20+
@version 1.14.0
2121
@title hackney - HTTP client library in Erlang
2222

2323
@doc

src/hackney.app.src

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{application, hackney,
55
[
66
{description, "simple HTTP client"},
7-
{vsn, "1.13.0"},
7+
{vsn, "1.14.0"},
88
{registered, [hackney_pool]},
99
{applications, [kernel,
1010
stdlib,

0 commit comments

Comments
 (0)