4. HTTP Client
4 HTTP Client
4.1 Configuration
The HTTP client default profile is started when the Inets
application is started and is then available to all processes on that Erlang node. Other profiles can also be started at application startup, or profiles can be started and stopped dynamically in runtime. Each client profile spawns a new process to handle each request, unless a persistent connection can be used with or without pipelining. The client adds a host
header and an empty te
header if there are no such headers present in the request.
The client supports IPv6 as long as the underlying mechanisms also do so.
The following is to be put in the Erlang node application configuration file to start a profile at application startup:
[{inets, [{services, [{httpc, PropertyList}]}]}]
For valid properties, see 登录查看完整内容