[erlang-questions] HTTP client for OAuth
Benoit Chesneau
bchesneau@REDACTED
Thu Feb 25 11:14:10 CET 2016
Yes so there are external modules to handle the following:
- IDNA
- SSL certificates access (certifi)
- SSL Host validation
- Mimes handling (simple module providing a way to retrieves mimes headers
from a file extension and the other way)
Over the time the codebase have grown without much planning to answer to
more demands. Too much for my taste I would say. The coming version that
must land this week tends to more simplicity and less dependencies.
The way I see hackney is as a toolbox in which you can pick what you need
to interact with the web and the web of things. It means anything to
interact with HTTP(1.1,2), Websockets and others specs like COAP once I
figured how to handle DTLS properly in Erlang.
So in short the next version is simple but will keep the current API for
the HTTP requests so going from hackney 1 to 2 shouldn't be hard.
- benoît
On Thu, Feb 25, 2016 at 10:25 AM John Doe <donpedrothird@REDACTED> wrote:
> If i remember right, most of the deps in hackney are for ssl (certs etc)
> and idn domains support.
>
> 2016-02-24 22:01 GMT+03:00 Garrett Smith <g@REDACTED>:
>
>> On Wed, Feb 24, 2016 at 10:49 AM Benoit Chesneau <bchesneau@REDACTED>
>> wrote:
>>
>>> On Wed, Feb 24, 2016 at 4:49 PM Garrett Smith <g@REDACTED> wrote:
>>>
>>>> I'm taking time off from typing -module attributes to focus on my
>>>> backlog of other important problems...
>>>>
>>>> I'm interfacing with various OAuth providers within an Erlang
>>>> application and I need a simple HTTP client. I've poked around the
>>>> ecosystem and have learned that HTTP clients are the new MySQL clients in
>>>> terms of which-one-to-freakin-use.
>>>>
>>>> As I'm using this for user auth, memory and performance are
>>>> considerations, though far behind stability and actual-workingness.
>>>>
>>>> (In the interest of the later, I'd traditionally wrap OS curl processes
>>>> because curl is known to actually work, but that _might_ not be feasible as
>>>> the application grows. Come to think of it, I'm going to start with a curl
>>>> wrapper and iterate by measuring, so never mind.)
>>>>
>>>> I'd love to learn from the field experience of others. Is anyone
>>>> really, really happy with the HTTP client he or she is using for semi-heavy
>>>> loads like user auth?
>>>>
>>> _______________________________________________
>>>> erlang-questions mailing list
>>>> erlang-questions@REDACTED
>>>> http://erlang.org/mailman/listinfo/erlang-questions
>>>
>>>
>>> Well I would advise hackney of course :) The pool part is completely
>>> optional and it will be gone in the week release anyway. It's used as a
>>> large scale in some companies handing millions of connections. It provides
>>> you a REST client API, streaming (transparent or not) and so on.
>>>
>>
>> I'll probably come around to this, but I was initially surprised by the
>> four, or maybe it was five, even six additional apps that came along with
>> hackney. Are you sure it isn't an HTTP _server_? :p
>>
>>
>>>
>>> If you want to do in a minimal way, I extracted the parser in a library:
>>> https://github.com/benoitc/nplib/blob/master/src/nplib_http.erl
>>>
>>> and then uses it with gen_tcp.
>>>
>>> This is interesting - I'll take a look!
>>
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160225/964f3d30/attachment.htm>
More information about the erlang-questions
mailing list