Skip to content
Commits on Sep 25, 2012
  1. @benoitc

    add a note for multipart

    benoitc committed Sep 26, 2012
  2. @benoitc

    bump to 0.3.0

    benoitc committed Sep 26, 2012
  3. @benoitc
  4. @benoitc
  5. @benoitc

    update changes

    benoitc committed Sep 26, 2012
  6. @benoitc

    Merge pull request #7 from tsloughter/master

    fix: added back catch of 4 tuple response to transferdecode
    benoitc committed Sep 25, 2012
  7. @benoitc

    fix code indentation

    benoitc committed Sep 26, 2012
  8. @benoitc
  9. @benoitc

    add HTTP proxy tunneling

    benoitc committed Sep 26, 2012
  10. fix: added back catch of 4 tuple response to transferdecode

    Tristan Sloughter committed Sep 25, 2012
  11. @benoitc

    fix issue link

    benoitc committed Sep 25, 2012
  12. @benoitc

    typo

    benoitc committed Sep 25, 2012
  13. @benoitc
  14. @benoitc

    add THANKS

    benoitc committed Sep 25, 2012
  15. @benoitc

    fixed chunk encoding response handling

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

    detect content type in multipart form.

    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.
    benoitc committed Sep 22, 2012
  2. @benoitc

    add missing file

    benoitc committed Sep 22, 2012
  3. @benoitc

    regen doc

    benoitc committed Sep 22, 2012
  4. @khia @benoitc

    Support for encoding multipart forms.

    khia committed with benoitc Sep 11, 2012
Commits on Aug 6, 2012
  1. @l4u @benoitc

    Fix variable matching in hackney_url

    l4u committed with benoitc Aug 5, 2012
Commits on Jul 26, 2012
  1. @benoitc
Commits on Jul 18, 2012
  1. @benoitc
  2. @benoitc

    regen doc

    benoitc committed Jul 19, 2012
  3. @benoitc

    bump to 0.2.0

    benoitc committed Jul 19, 2012
  4. @benoitc

    update readme

    benoitc committed Jul 19, 2012
  5. @benoitc

    add the NEWS file

    benoitc committed Jul 18, 2012
  6. @benoitc

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

    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 .
    benoitc committed Jul 18, 2012
  7. @benoitc

    add option to automatically follow a redirection.

    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).
    benoitc committed Jul 18, 2012
Commits on Jul 17, 2012
  1. @benoitc

    support chunked encoding

    benoitc committed Jul 18, 2012
  2. @benoitc

    regen the doc

    benoitc committed Jul 17, 2012
  3. @benoitc

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

    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).
    benoitc committed Jul 17, 2012
  4. @benoitc

    Merge pull request #1 from aerosol/master

    Little big comment fix
    benoitc committed Jul 17, 2012
  5. @aerosol

    Fix comment

    aerosol committed Jul 17, 2012
  6. @benoitc

    typo

    benoitc committed Jul 17, 2012
  7. @benoitc

    forgot to regen the doc

    benoitc committed Jul 17, 2012
Something went wrong with that request. Please try again.