Module p1_http

Data Types

header()

header() = {string() | atom(), string()}

headers()

headers() = [header()]

option()

option() = {connect_timeout, timeout()} | {timeout, timeout()} | {send_retry, non_neg_integer()} | {partial_upload, non_neg_integer() | infinity} | {partial_download, pid(), non_neg_integer() | infinity}

options()

options() = [option()]

result()

result() = {ok, {{pos_integer(), string()}, headers(), string()}} | {error, atom()}

Function Index

get/1Sends a GET request.
get/2Sends a GET request.
get_pool_size/0
get_pool_size/0
get_pool_size/0
post/2Sends a POST request with form data.
post/3Sends a POST request.
request/3Sends a request without a body.
request/4Sends a request with a body.
request/5Sends a request with a body.
request/5Sends a request with a body.
request/5Sends a request with a body.
set_pool_size/1
set_pool_size/1
set_pool_size/1
start/0
start/0
start/0
stop/0
stop/0
stop/0

Function Details

get/1

get(URL::string()) -> result()

Sends a GET request. Would be the same as calling request(get, URL, []), that is request/3 with an empty header list.

See also: request/3.

get/2

get(URL::string(), Hdrs::headers()) -> result()

Sends a GET request. Would be the same as calling request(get, URL, Hdrs).

See also: request/3.

get_pool_size/0

get_pool_size() -> any()

get_pool_size/0

get_pool_size() -> any()

get_pool_size/0

get_pool_size() -> any()

post/2

post(URL::string(), Body::string()) -> result()

Sends a POST request with form data. Would be the same as calling request(post, URL, [{"content-type", "x-www-form-urlencoded"}], Body).

See also: request/4.

post/3

post(URL::string(), Hdrs::headers(), Body::string()) -> result()

Sends a POST request. Would be the same as calling request(post, URL, Hdrs, Body).

See also: request/4.

request/3

request(Method::atom(), URL::string(), Hdrs::headers()) -> result()

Sends a request without a body. Would be the same as calling request(Method, URL, Hdrs, [], []), that is request/5 with an empty body.

See also: request/5.

request/4

request(Method::atom(), URL::string(), Hdrs::headers(), Body::string()) -> result()

Sends a request with a body. Would be the same as calling request(Method, URL, Hdrs, Body, []), that is request/5 with no options.

See also: request/5.

request/5

request(Method::atom(), URL::string(), Hdrs::headers(), Body::string(), Opts::options()) -> result()

Sends a request with a body. Would be the same as calling request(Method, URL, Hdrs, Body, []), that is request/5 with no options.

See also: request/5.

request/5

request(Method::atom(), URL::string(), Hdrs::headers(), Body::string(), Opts::options()) -> result()

Sends a request with a body. Would be the same as calling request(Method, URL, Hdrs, Body, []), that is request/5 with no options.

See also: request/5.

request/5

request(Method::atom(), URLRaw::string(), HdrsRaw::headers(), Body::string(), Opts::options()) -> result()

Sends a request with a body. Would be the same as calling request(Method, URL, Hdrs, Body, []), that is request/5 with no options.

See also: request/5.

set_pool_size/1

set_pool_size(Size) -> any()

set_pool_size/1

set_pool_size(Size) -> any()

set_pool_size/1

set_pool_size(Size) -> any()

start/0

start() -> any()

start/0

start() -> any()

start/0

start() -> any()

stop/0

stop() -> any()

stop/0

stop() -> any()

stop/0

stop() -> any()


Generated by EDoc