@@ -273,7 +273,7 @@ make a request
273273### request/5 ###
274274
275275<pre ><code >
276- request(Method::term(), Hackney_url::<a href =" #type-url " >url()</a > | binary() | list(), Headers0::list(), Body::term(), Options0::list()) -> ; {ok, integer(), list(), <a href =" #type-client_ref " >client_ref()</a >} | {ok, integer(), list()} | {ok, <a href =" #type-client_ref " >client_ref()</a >} | {error, term()}
276+ request(Method::term(), Hackney_url::<a href =" #type-url " >url()</a > | binary() | list(), Headers0::list(), Body::term(), Options0::list()) -> ; {ok, integer(), list(), <a href =" #type-client_ref " >client_ref()</a >} | {ok, integer(), list(), binary()} | {ok, integer(), list() } | {ok, <a href =" #type-client_ref " >client_ref()</a >} | {error, term()}
277277</code ></pre >
278278<br />
279279
@@ -392,19 +392,22 @@ to connect to an HTTP tunnel.
392392
393393
394394
395- <bloquote >Note: instead of doing ` hackney:request(Method, ...) ` you can
395+ <blockquote >Note: instead of doing `hackney:request(Method, ...)` you can
396396also do ` hackney:Method(...) ` if you prefer to use the REST
397- syntax.</bloquote >
397+ syntax.</blockquote >
398398
399399Return:
400400
401401* ` {ok, ResponseStatus, ResponseHeaders} ` : On HEAD
402402request if the response succeeded.
403403
404- * ` {ok, ResponseStatus, ResponseHeaders, Ref} ` : when
404+ * ` {ok, ResponseStatus, ResponseHeaders, Ref} ` : When
405405the response succeeded. The request reference is used later to
406406retrieve the body.
407407
408+ * ` {ok, ResponseStatus, ResponseHeaders, Body} ` : When the
409+ option ` with_body ` is set to true and the response succeeded.
410+
408411* ` {ok, Ref} ` Return the request reference when you
409412decide to stream the request. You can use the returned reference to
410413stream the request body and continue to handle the response.
@@ -642,3 +645,4 @@ stream_next(Ref::<a href="#type-client_ref">client_ref()</a>) -> ok | {error,
642645
643646continue to the next stream message. Only use it when
644647` {async, once} ` is set in the client options.
648+
0 commit comments