# Module cloudi_service_http_client

- Description
- Data Types
- Function Index
- Function Details

### CloudI HTTP Client Service

.

Copyright © 2014-2021 Michael Truog

Version: 2.0.3 Dec 3 2021 22:56:27 ------------------------------------------------------------------------

Behaviours: `cloudi_service`.

Authors: Michael Truog (`mjtruog at protonmail dot com`).

## Description

### CloudI HTTP Client Service

## Data Types

### agent()

`agent() = cloudi:agent()`

### headers()

`headers() = [{binary(), binary()}]`

### service_name()

`service_name() = cloudi:service_name()`

### timeout_milliseconds()

`timeout_milliseconds() = cloudi:timeout_milliseconds()`

## Function Index

cloudi_service_handle_request/11 |
cloudi_service_init/4 |
cloudi_service_terminate/3 |
delete/4 | #### A HTTP DELETE request. .
delete/5 | #### A HTTP DELETE request with a timeout. .
delete_async/4 | #### A HTTP DELETE async request. .
delete_async/5 | #### A HTTP DELETE async request with a timeout. .
get/4 | #### A HTTP GET request. .
get/5 | #### A HTTP GET request with a timeout. .
get_async/4 | #### A HTTP GET async request. .
get_async/5 | #### A HTTP GET async request with a timeout. .
head/4 | #### A HTTP HEAD request. .
head/5 | #### A HTTP HEAD request with a timeout. .
head_async/4 | #### A HTTP HEAD async request. .
head_async/5 | #### A HTTP HEAD async request with a timeout. .
options/4 | #### A HTTP OPTIONS request. .
options/5 | #### A HTTP OPTIONS request with a timeout. .
options_async/4 | #### A HTTP OPTIONS async request. .
options_async/5 | #### A HTTP OPTIONS async request with a timeout. .
post/4 | #### A HTTP POST request. .
post/5 | #### A HTTP POST request with a timeout. .
post_async/4 | #### A HTTP POST async request. .
post_async/5 | #### A HTTP POST async request with a timeout. .
put/4 | #### A HTTP PUT request. .
put/5 | #### A HTTP PUT request with a timeout. .
put_async/4 | #### A HTTP PUT async request. .
put_async/5 | #### A HTTP PUT async request with a timeout. .
trace/4 | #### A HTTP TRACE request. .
trace/5 | #### A HTTP TRACE request with a timeout. .
trace_async/4 | #### A HTTP TRACE async request. .
trace_async/5 | #### A HTTP TRACE async request with a timeout. .

## Function Details

### cloudi_service_handle_request/11

`cloudi_service_handle_request(RequestType, Name, Pattern, RequestInfo, Request, Timeout, Priority, TransId, Pid, State, Dispatcher) -> any()`

### cloudi_service_init/4

`cloudi_service_init(Args, Prefix, Timeout, Dispatcher) -> any()`

### cloudi_service_terminate/3

`cloudi_service_terminate(Reason, Timeout, State) -> any()`

### delete/4

`delete(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary()) -> {{ok, headers(), binary()} | {error, any()}, NewAgent::agent()}`

#### A HTTP DELETE request.

### delete/5

`delete(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary(), Timeout::timeout_milliseconds()) -> {{ok, headers(), binary()} | {error, any()}, NewAgent::agent()}`

#### A HTTP DELETE request with a timeout.

### delete_async/4

`delete_async(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary()) -> {{ok, cloudi:trans_id()} | {error, cloudi:error_reason()}, NewAgent::agent()}`

#### A HTTP DELETE async request.

### delete_async/5

`delete_async(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary(), Timeout::timeout_milliseconds()) -> {{ok, cloudi:trans_id()} | {error, cloudi:error_reason()}, NewAgent::agent()}`

#### A HTTP DELETE async request with a timeout.

### get/4

`get(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary()) -> {{ok, headers(), binary()} | {error, any()}, NewAgent::agent()}`

#### A HTTP GET request.

### get/5

`get(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary(), Timeout::timeout_milliseconds()) -> {{ok, headers(), binary()} | {error, any()}, NewAgent::agent()}`

#### A HTTP GET request with a timeout.

### get_async/4

`get_async(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary()) -> {{ok, cloudi:trans_id()} | {error, cloudi:error_reason()}, NewAgent::agent()}`

#### A HTTP GET async request.

### get_async/5

`get_async(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary(), Timeout::timeout_milliseconds()) -> {{ok, cloudi:trans_id()} | {error, cloudi:error_reason()}, NewAgent::agent()}`

#### A HTTP GET async request with a timeout.

### head/4

`head(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary()) -> {{ok, headers(), binary()} | {error, any()}, NewAgent::agent()}`

#### A HTTP HEAD request.

### head/5

`head(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary(), Timeout::timeout_milliseconds()) -> {{ok, headers(), binary()} | {error, any()}, NewAgent::agent()}`

#### A HTTP HEAD request with a timeout.

### head_async/4

`head_async(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary()) -> {{ok, cloudi:trans_id()} | {error, cloudi:error_reason()}, NewAgent::agent()}`

#### A HTTP HEAD async request.

### head_async/5

`head_async(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary(), Timeout::timeout_milliseconds()) -> {{ok, cloudi:trans_id()} | {error, cloudi:error_reason()}, NewAgent::agent()}`

#### A HTTP HEAD async request with a timeout.

### options/4

`options(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary()) -> {{ok, headers(), binary()} | {error, any()}, NewAgent::agent()}`

#### A HTTP OPTIONS request.

### options/5

`options(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary(), Timeout::timeout_milliseconds()) -> {{ok, headers(), binary()} | {error, any()}, NewAgent::agent()}`

#### A HTTP OPTIONS request with a timeout.

### options_async/4

`options_async(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary()) -> {{ok, cloudi:trans_id()} | {error, cloudi:error_reason()}, NewAgent::agent()}`

#### A HTTP OPTIONS async request.

### options_async/5

`options_async(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary(), Timeout::timeout_milliseconds()) -> {{ok, cloudi:trans_id()} | {error, cloudi:error_reason()}, NewAgent::agent()}`

#### A HTTP OPTIONS async request with a timeout.

### post/4

`post(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary()) -> {{ok, headers(), binary()} | {error, any()}, NewAgent::agent()}`

#### A HTTP POST request.

### post/5

`post(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary(), Timeout::timeout_milliseconds()) -> {{ok, headers(), binary()} | {error, any()}, NewAgent::agent()}`

#### A HTTP POST request with a timeout.

### post_async/4

`post_async(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary()) -> {{ok, cloudi:trans_id()} | {error, cloudi:error_reason()}, NewAgent::agent()}`

#### A HTTP POST async request.

### post_async/5

`post_async(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary(), Timeout::timeout_milliseconds()) -> {{ok, cloudi:trans_id()} | {error, cloudi:error_reason()}, NewAgent::agent()}`

#### A HTTP POST async request with a timeout.

### put/4

`put(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary()) -> {{ok, headers(), binary()} | {error, any()}, NewAgent::agent()}`

#### A HTTP PUT request.

### put/5

`put(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary(), Timeout::timeout_milliseconds()) -> {{ok, headers(), binary()} | {error, any()}, NewAgent::agent()}`

#### A HTTP PUT request with a timeout.

### put_async/4

`put_async(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary()) -> {{ok, cloudi:trans_id()} | {error, cloudi:error_reason()}, NewAgent::agent()}`

#### A HTTP PUT async request.

### put_async/5

`put_async(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary(), Timeout::timeout_milliseconds()) -> {{ok, cloudi:trans_id()} | {error, cloudi:error_reason()}, NewAgent::agent()}`

#### A HTTP PUT async request with a timeout.

### trace/4

`trace(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary()) -> {{ok, headers(), binary()} | {error, any()}, NewAgent::agent()}`

#### A HTTP TRACE request.

### trace/5

`trace(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary(), Timeout::timeout_milliseconds()) -> {{ok, headers(), binary()} | {error, any()}, NewAgent::agent()}`

#### A HTTP TRACE request with a timeout.

### trace_async/4

`trace_async(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary()) -> {{ok, cloudi:trans_id()} | {error, cloudi:error_reason()}, NewAgent::agent()}`

#### A HTTP TRACE async request.

### trace_async/5

`trace_async(Agent::agent(), Prefix::service_name(), RequestInfo::headers(), Request::binary(), Timeout::timeout_milliseconds()) -> {{ok, cloudi:trans_id()} | {error, cloudi:error_reason()}, NewAgent::agent()}`

#### A HTTP TRACE async request with a timeout.

Generated by EDoc