[erlang-questions] http client and keep_alive

Adriano Bonat adrianob@REDACTED
Tue Jun 9 16:25:13 CEST 2009


You can provide a header {"Connection", "close"} to the request, or
use HTTP/1.0, the manual says:

version
Can be used to make the client act as an HTTP/1.0 or HTTP/0.9 client.
By default this is an HTTP/1.1 client. When using HTTP/1.0 persistent
connections will not be used.

Regards.

On Mon, Jun 8, 2009 at 8:00 PM, Joel Reymont<joelr1@REDACTED> wrote:
> Is there a way to disable keep_alive for the http client? I really want it
> to keep a single connection to the server and close it after each request.
>
> I tried this set of options to http:request/4 but they don't do the trick.
>
> http_client_opts() ->
>    [{max_sessions, 1},
>     {max_pipeline_length, 1},
>     {max_keepalive_length, 1},
>     {pipeline_timeout, 1},
>     {keep_alive_timeout, 0}].
>
>        Thanks, Joel
>
> ---
> Mac hacker with a performance bent
> http://www.linkedin.com/in/joelreymont
>
>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
>
>


More information about the erlang-questions mailing list