Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Commits on Sep 25, 2012
  1. @benoitc

    add a note for multipart

    benoitc authored
  2. @benoitc

    bump to 0.3.0

    benoitc authored
  3. @benoitc
  4. @benoitc
  5. @benoitc

    update changes

    benoitc authored
  6. @benoitc

    Merge pull request #7 from tsloughter/master

    benoitc authored
    fix: added back catch of 4 tuple response to transferdecode
  7. @benoitc

    fix code indentation

    benoitc authored
  8. @benoitc
  9. @benoitc

    add HTTP proxy tunneling

    benoitc authored
  10. fix: added back catch of 4 tuple response to transferdecode

    Tristan Sloughter authored
  11. @benoitc

    fix issue link

    benoitc authored
  12. @benoitc

    typo

    benoitc authored
  13. @benoitc
  14. @benoitc

    add THANKS

    benoitc authored
  15. @benoitc

    fixed chunk encoding response handling

    Tristan Sloughter authored benoitc committed
Commits on Sep 22, 2012
  1. @benoitc

    detect content type in multipart form.

    benoitc authored
    Rather than always use 'application/octet-stream' for the content-type
    in multipart forms, try to detect it. While I'm here reuse the functions
    already used to send a file.
  2. @benoitc

    add missing file

    benoitc authored
  3. @benoitc

    regen doc

    benoitc authored
  4. @khia @benoitc

    Support for encoding multipart forms.

    khia authored benoitc committed
Commits on Aug 6, 2012
  1. @l4u @benoitc

    Fix variable matching in hackney_url

    l4u authored benoitc committed
Commits on Jul 26, 2012
  1. @benoitc
Commits on Jul 18, 2012
  1. @benoitc
  2. @benoitc

    regen doc

    benoitc authored
  3. @benoitc

    bump to 0.2.0

    benoitc authored
  4. @benoitc

    update readme

    benoitc authored
  5. @benoitc

    add the NEWS file

    benoitc authored
  6. @benoitc

    allows the user to force hackney to use the default pool.

    benoitc authored
    Sometimes you want to always use the default pool in your app without
    having to set the client option each time. You can now do this by setting
    the hackney application environment key `use_default_pool` to true .
  7. @benoitc

    add option to automatically follow a redirection.

    benoitc authored
    If the option `{follow_redirect, true}` is given to the request, the
    client will be abble to automatically follow the redirection and
    retrieve the body. The maximum number of connection can be set using the
    `{max_redirect, Max}` option. Default is 5.
    
    The client will follow redirection on 301, 302 & 307 if the method is
    get or head. If another method is used the tuple
    `{ok, maybe_redirect, Status, Headers, Client}` will be returned. It
    only follow 303 redirection (see other) if the method is a POST.
    
    Last Location is stored in the client state in the `location` property.
    
    ex:
    
        Method = get,
        URL = "http://friendpaste.com/",
        ReqHeaders = [{<<"accept-encoding">>, <<"identity">>}],
        ReqBody = <<>>,
        Options = [{follow_redirect, true}, {max_redirect, true}],
        {ok, S, H, Client} = hackney:request(Method, URL, ReqHeaders,
                                             ReqBody, Options),
        {ok, Body, Client1} = hackney:body(Client).
Commits on Jul 17, 2012
  1. @benoitc

    support chunked encoding

    benoitc authored
  2. @benoitc

    regen the doc

    benoitc authored
  3. @benoitc

    allows the use of a custom function to stream the body if neeeded.

    benoitc authored
    While the default is to diretcly send the request and fetch the status
    and headers if the body is set as the atom `stream` the request and
    send_request function will return {ok, Client}. Then you can use the
    function `hackney:stream_request_body/2` to stream the request body and
    `hackney:start_response/1` to initialize the respone.
    
    The function `hackney:start_response/1` is waiting a Client with
    theresponse state equal to the atom `waiting` .
    
    ex:
    
        ReqBody = << "{
              \"id\": \"some_paste_id2\",
              \"rev\": \"some_revision_id\",
              \"changeset\": \"changeset in unidiff format\"
        }" >>,
        ReqHeaders = [{<<"Content-Type">>, <<"application/json">>}],
        Path = <<"https://friendpaste.com/">>,
        Method = post,
        {ok, Client} = hackney:request(Method, Path, ReqHeaders, stream,
                                       []),
    
        {ok, Client1} = hackney:stream_request_body(ReqBody, Client),
        {ok, _Status, _Headers, Client2} = hackney:start_response(Client1),
        {ok, Body, Client3} = hackney:body(Client2),
        hackney:close(Client3).
  4. @benoitc

    Merge pull request #1 from aerosol/master

    benoitc authored
    Little big comment fix
  5. @aerosol

    Fix comment

    aerosol authored
  6. @benoitc

    typo

    benoitc authored
  7. @benoitc

    forgot to regen the doc

    benoitc authored
Something went wrong with that request. Please try again.