Skip to content
Browse files

bump to 0.40

  • Loading branch information...
1 parent a1f7046 commit 64329fbeb7a9810ea48aa4ade6b72af4853f9668 @benoitc committed
Showing with 98 additions and 14 deletions.
  1. +14 −0 NEWS.md
  2. +1 −1 README.md
  3. +1 −1 doc/README.md
  4. +53 −3 doc/hackney.md
  5. +15 −2 doc/hackney_multipart.md
  6. +8 −1 doc/hackney_request.md
  7. +1 −1 doc/overview.edoc
  8. +2 −2 package.exs
  9. +1 −1 src/hackney.app.src
  10. +2 −2 src/hackney.erl
View
14 NEWS.md
@@ -1,5 +1,19 @@
# NEWS
+0.4.0 - 2012/10/26
+------------------
+
+- Allows to stream a multipart request
+- Add `insecure` option to connect via ssl without verifying an SSL
+ certificate
+- Handle empty headers values
+- Add `force_redirect` option
+- Add expm support
+- Fix body streaming
+- Fix SSL handling
+- Fix hackney:request/3 (no more loop)
+
+
0.3.0 - 2012/09/26
------------------
View
2 README.md
@@ -5,7 +5,7 @@
Copyright (c) 2012 Benoît Chesneau.
-__Version:__ 0.3
+__Version:__ 0.4
# hackney
View
2 doc/README.md
@@ -5,7 +5,7 @@
Copyright (c) 2012 Benoît Chesneau.
-__Version:__ 0.3
+__Version:__ 0.4
# hackney
View
56 doc/hackney.md
@@ -11,7 +11,22 @@
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#body-1">body/1</a></td><td>Return the full body sent with the response.</td></tr><tr><td valign="top"><a href="#body-2">body/2</a></td><td>Return the full body sent with the response as long as the body
-length doesn't go over MaxLength.</td></tr><tr><td valign="top"><a href="#close-1">close/1</a></td><td>close the client.</td></tr><tr><td valign="top"><a href="#connect-1">connect/1</a></td><td>connect a socket and create a client state.</td></tr><tr><td valign="top"><a href="#connect-3">connect/3</a></td><td></td></tr><tr><td valign="top"><a href="#connect-4">connect/4</a></td><td></td></tr><tr><td valign="top"><a href="#pool-1">pool/1</a></td><td>get current pool pid or name used by a client if needed.</td></tr><tr><td valign="top"><a href="#request-1">request/1</a></td><td>make a request.</td></tr><tr><td valign="top"><a href="#request-2">request/2</a></td><td>make a request.</td></tr><tr><td valign="top"><a href="#request-3">request/3</a></td><td>make a request.</td></tr><tr><td valign="top"><a href="#request-4">request/4</a></td><td>make a request.</td></tr><tr><td valign="top"><a href="#request-5">request/5</a></td><td>make a request.</td></tr><tr><td valign="top"><a href="#send_request-2">send_request/2</a></td><td>send a request using the current client state.</td></tr><tr><td valign="top"><a href="#set_sockopts-2">set_sockopts/2</a></td><td>add set sockets options in the client.</td></tr><tr><td valign="top"><a href="#skip_body-1">skip_body/1</a></td><td>skip the full body.</td></tr><tr><td valign="top"><a href="#start-0">start/0</a></td><td>Start the couchbeam process.</td></tr><tr><td valign="top"><a href="#start_pool-2">start_pool/2</a></td><td>start a pool.</td></tr><tr><td valign="top"><a href="#start_response-1">start_response/1</a></td><td>start a response.</td></tr><tr><td valign="top"><a href="#stop-0">stop/0</a></td><td>Stop the couchbeam process.</td></tr><tr><td valign="top"><a href="#stop_pool-1">stop_pool/1</a></td><td>stop a pool.</td></tr><tr><td valign="top"><a href="#stream_body-1">stream_body/1</a></td><td>Stream the response body.</td></tr><tr><td valign="top"><a href="#stream_request_body-2">stream_request_body/2</a></td><td>stream the request body.</td></tr></table>
+length doesn't go over MaxLength.</td></tr><tr><td valign="top"><a href="#close-1">close/1</a></td><td>close the client.</td></tr><tr><td valign="top"><a href="#connect-1">connect/1</a></td><td>connect a socket and create a client state.</td></tr><tr><td valign="top"><a href="#connect-3">connect/3</a></td><td></td></tr><tr><td valign="top"><a href="#connect-4">connect/4</a></td><td></td></tr><tr><td valign="top"><a href="#end_stream_request_body-1">end_stream_request_body/1</a></td><td>end streaming the request body.</td></tr><tr><td valign="top"><a href="#pool-1">pool/1</a></td><td>get current pool pid or name used by a client if needed.</td></tr><tr><td valign="top"><a href="#request-1">request/1</a></td><td>make a request.</td></tr><tr><td valign="top"><a href="#request-2">request/2</a></td><td>make a request.</td></tr><tr><td valign="top"><a href="#request-3">request/3</a></td><td>make a request.</td></tr><tr><td valign="top"><a href="#request-4">request/4</a></td><td>make a request.</td></tr><tr><td valign="top"><a href="#request-5">request/5</a></td><td>make a request.</td></tr><tr><td valign="top"><a href="#send_request-2">send_request/2</a></td><td>send a request using the current client state.</td></tr><tr><td valign="top"><a href="#set_sockopts-2">set_sockopts/2</a></td><td>add set sockets options in the client.</td></tr><tr><td valign="top"><a href="#skip_body-1">skip_body/1</a></td><td>skip the full body.</td></tr><tr><td valign="top"><a href="#start-0">start/0</a></td><td>Start the couchbeam process.</td></tr><tr><td valign="top"><a href="#start_pool-2">start_pool/2</a></td><td>start a pool.</td></tr><tr><td valign="top"><a href="#start_response-1">start_response/1</a></td><td>start a response.</td></tr><tr><td valign="top"><a href="#stop-0">stop/0</a></td><td>Stop the couchbeam process.</td></tr><tr><td valign="top"><a href="#stop_pool-1">stop_pool/1</a></td><td>stop a pool.</td></tr><tr><td valign="top"><a href="#stream_body-1">stream_body/1</a></td><td>Stream the response body.</td></tr><tr><td valign="top"><a href="#stream_multipart_request-2">stream_multipart_request/2</a></td><td>stream a multipart request until eof
+Possible value are :
+<ul>
+<li><code>eof</code>: end the multipart request</li>
+<li><code>{Id, {File, FileName}}</code>: to stream a file</li>
+<li><code>{data, {start, Id, DileName, ContentType}}</code>: to start to stream
+arbitrary binary content</li>
+<li><code>{data, Bin}`: send a binary. Use it only after emitting a
+**start**</li>
+<li>`{data, eof}`: stop sending an arbitary content. It doesn</code>t stop
+the multipart request</li>
+<li><code>{Id, {file, Filename, Content}</code>: send a full content as a
+boundary</li>
+<li><code>{Id, Value}</code>: send an arbitrary value as a boundary. Filename and
+Id are identique</li>
+</ul></td></tr><tr><td valign="top"><a href="#stream_request_body-2">stream_request_body/2</a></td><td>stream the request body.</td></tr></table>
<a name="functions"></a>
@@ -65,7 +80,14 @@ connect a socket and create a client state.<a name="connect-3"></a>
`connect(Transport, Host, Port, Client) -> any()`
-<a name="pool-1"></a>
+<a name="end_stream_request_body-1"></a>
+
+###end_stream_request_body/1##
+
+
+`end_stream_request_body(Client) -> any()`
+
+end streaming the request body.<a name="pool-1"></a>
###pool/1##
@@ -260,7 +282,35 @@ stop a pool<a name="stream_body-1"></a>
`stream_body(Client) -> any()`
-Stream the response body.<a name="stream_request_body-2"></a>
+Stream the response body.<a name="stream_multipart_request-2"></a>
+
+###stream_multipart_request/2##
+
+
+`stream_multipart_request(Body, Client) -> any()`
+
+stream a multipart request until eof
+Possible value are :
+
+* `eof`: end the multipart request
+
+* `{Id, {File, FileName}}`: to stream a file
+
+* `{data, {start, Id, DileName, ContentType}}`: to start to stream
+arbitrary binary content
+
+* `{data, Bin}`: send a binary. Use it only after emitting a
+**start**</li>
+<li>`{data, eof}`: stop sending an arbitary content. It doesn`t stop
+the multipart request
+
+* `{Id, {file, Filename, Content}`: send a full content as a
+boundary
+
+* `{Id, Value}`: send an arbitrary value as a boundary. Filename and
+Id are identique
+
+<a name="stream_request_body-2"></a>
###stream_request_body/2##
View
17 doc/hackney_multipart.md
@@ -13,13 +13,20 @@ module to encode/decode forms.
##Function Index##
-<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#decode_form-1">decode_form/1</a></td><td></td></tr><tr><td valign="top"><a href="#encode_form-1">encode_form/1</a></td><td>encode a list of properties in a form.</td></tr></table>
+<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#boundary-0">boundary/0</a></td><td></td></tr><tr><td valign="top"><a href="#decode_form-1">decode_form/1</a></td><td></td></tr><tr><td valign="top"><a href="#encode_form-1">encode_form/1</a></td><td>encode a list of properties in a form.</td></tr><tr><td valign="top"><a href="#stream-2">stream/2</a></td><td></td></tr></table>
<a name="functions"></a>
##Function Details##
+<a name="boundary-0"></a>
+
+###boundary/0##
+
+
+`boundary() -> any()`
+
<a name="decode_form-1"></a>
###decode_form/1##
@@ -34,4 +41,10 @@ module to encode/decode forms.
`encode_form(KVs) -> any()`
-encode a list of properties in a form.
+encode a list of properties in a form.<a name="stream-2"></a>
+
+###stream/2##
+
+
+`stream(X1, Client) -> any()`
+
View
9 doc/hackney_request.md
@@ -10,13 +10,20 @@
##Function Index##
-<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#perform-2">perform/2</a></td><td></td></tr><tr><td valign="top"><a href="#send-2">send/2</a></td><td></td></tr><tr><td valign="top"><a href="#send_chunk-2">send_chunk/2</a></td><td></td></tr><tr><td valign="top"><a href="#sendfile-2">sendfile/2</a></td><td></td></tr><tr><td valign="top"><a href="#stream_body-2">stream_body/2</a></td><td></td></tr></table>
+<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#end_stream_body-1">end_stream_body/1</a></td><td></td></tr><tr><td valign="top"><a href="#perform-2">perform/2</a></td><td></td></tr><tr><td valign="top"><a href="#send-2">send/2</a></td><td></td></tr><tr><td valign="top"><a href="#send_chunk-2">send_chunk/2</a></td><td></td></tr><tr><td valign="top"><a href="#sendfile-2">sendfile/2</a></td><td></td></tr><tr><td valign="top"><a href="#stream_body-2">stream_body/2</a></td><td></td></tr></table>
<a name="functions"></a>
##Function Details##
+<a name="end_stream_body-1"></a>
+
+###end_stream_body/1##
+
+
+`end_stream_body(Client) -> any()`
+
<a name="perform-2"></a>
###perform/2##
View
2 doc/overview.edoc
@@ -16,7 +16,7 @@
@copyright 2012 Benoît Chesneau.
-@version 0.3
+@version 0.4
@title hackney - simple HTTP client in Erlang
@doc
View
4 package.exs
@@ -1,5 +1,5 @@
Expm.Package.new(name: "hackney", description: "Simple HTTP client in Erlang",
- version: "0.3.2", keywords: ["http","client","binary"],
+ version: "0.4.0", keywords: ["http","client","binary"],
dependencies: ["mimetypes"],
licenses: [[name: "Apache License, Version 2.0", file: "LICENSE"]],
contributors: [[name: "Adam Rutkowski",
@@ -22,5 +22,5 @@ Expm.Package.new(name: "hackney", description: "Simple HTTP client in Erlang",
]],
maintainers: [[name: "Benoit Chesneau",
email: "bchesneau@gmail.com"]],
- repositories: [[github: "benoitc/hackney", tag: "0.3.2"]])
+ repositories: [[github: "benoitc/hackney", tag: "0.4.0"]])
View
2 src/hackney.app.src
@@ -4,7 +4,7 @@
{application, hackney,
[
{description, "simple HTTP client"},
- {vsn, "0.3.2"},
+ {vsn, "0.4.0"},
{registered, [hackney_pool]},
{applications, [kernel, stdlib, crypto, public_key, ssl]},
{mod, { hackney_app, nil}},
View
4 src/hackney.erl
@@ -249,9 +249,9 @@ end_stream_request_body(Client) ->
%% **start**</li>
%% <li>`{data, eof}`: stop sending an arbitary content. It doesn't stop
%% the multipart request</li>
-%% <li>`{Id, {file, Filename, Content}`: send a full content as a
+%% <li>`{Id, {file, Filename, Content}': send a full content as a
%% boundary</li>
-%% <li>`{Id, Value}: send an arbitrary value as a boundary. Filename and
+%% <li>`{Id, Value}': send an arbitrary value as a boundary. Filename and
%% Id are identique</li>
%% </ul>
stream_multipart_request(Body, Client) ->

0 comments on commit 64329fb

Please sign in to comment.
Something went wrong with that request. Please try again.