5 Matching Annotations
- Oct 2020
-
erlang.org erlang.org
-
HTTP CLIENT SERVICE START/STOP An HTTP client can be configured to start when starting the Inets application or started dynamically in runtime by calling the Inets application API inets:start(httpc, ServiceConfig) or inets:start(httpc, ServiceConfig, How), see inets(3). The configuration options are as follows: {profile, profile()} Name of the profile, see DATA TYPES. This option is mandatory. {data_dir, path()} Directory where the profile can save persistent data. If omitted, all cookies are treated as session cookies. The client can be stopped using inets:stop(httpc, Pid) or inets:stop(httpc, Profile).
inets:start()
will automatically start thehttpc
service also! -
profile() = atom()
This should be
profile() = default | atom()
because thehttpc
service is automatically started with the default profile (calleddefault
) wheninets
is started.See also How to get more information about error when starting Inets httpd?
Tags
Annotators
URL
-
-
erlang.org erlang.org
-
The HTTP client default profile is started when the Inets application is started and is then available to all processes on that Erlang node.
Tags
Annotators
URL
-
- May 2020
-
blog.erlang.org blog.erlang.org
-
In OTP 22 we introduced the new experimental socket API. The idea behind this API is to have a stable intermediary API that can be used to create features that are not part of the higher-level gen_* APIs. We have now come one step further in our plan to replace the inet driver by making it possible to use the gen_tcp API with socket as an optional back-end. To make it easy to test with existing code using gen_tcp a new option {inet_backend, socket | inet} can be used to select the socket implementation instead of the default inet implementation.
Q1: So
inet
andsocket
are competing socket implementations then?Q2:
inets
is higher level abstraction layer on top ofinet
? (Just as HTTP is higher level than transport protocols.)Q3 (corollary of Q1 and Q2):
inets
could be then rewritten to usesocket
instead? (And used just likegen_tcp
with theinet_backend
option?)
Tags
Annotators
URL
-
- Apr 2020
-
erlang.org erlang.org
-
Content-Length
Not mentioned anywhere (not even in the
inets
User's Guide), butContent-Length
is calculated automatically if it is not provided.
Tags
Annotators
URL
-