# Module cloudi_service_http_rest

- Description
- Data Types
- Function Index
- Function Details

### CloudI HTTP REST Integration

Provide an easy way of connecting CloudI service requests to Erlang function calls for a HTTP REST API, with service configuration arguments.

Copyright © 2015-2019 Michael Truog

Version: 1.8.0 Nov 28 2019 15:19:55 ------------------------------------------------------------------------

Behaviours: `cloudi_service`.

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

## Description

### CloudI HTTP REST Integration

Provide an easy way of connecting CloudI service requests to Erlang function calls for a HTTP REST API, with service configuration arguments.

## Data Types

### handler_f_11()

`handler_f_11() = fun((Method::method(), Path::cloudi:service_name_pattern(), Parameters::[string()], Format::atom(), RequestInfo::any(), Request::any(), Timeout::cloudi:timeout_value_milliseconds(), Priority::cloudi:priority_value(), TransId::cloudi:trans_id(), State::any(), Dispatcher::cloudi:dispatcher()) -> {reply, Response::any(), NewState::any()} | {reply, ResponseInfo::any(), Response::any(), NewState::any()} | {forward, NextName::cloudi:service_name(), NextRequestInfo::any(), NextRequest::any(), NewState::any()} | {forward, NextName::cloudi:service_name(), NextRequestInfo::any(), NextRequest::any(), NextTimeout::cloudi:timeout_value_milliseconds(), NextPriority::cloudi:priority_value(), NewState::any()} | {noreply, NewState::any()} | {stop, Reason::any(), NewState::any()})`

### info_f()

`info_f() = fun((Request::any(), State::any(), Dispatcher::cloudi:dispatcher()) -> {noreply, NewState::any()} | {stop, Reason::any(), NewState::any()})`

### initialize_f()

`initialize_f() = fun((Args::list(), Timeout::cloudi_service_api:timeout_initialize_value_milliseconds(), Dispatcher::cloudi:dispatcher()) -> {ok, State::any()} | {stop, Reason::any()} | {stop, Reason::any(), State::any()})`

### method()

`method() = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'TRACE' | 'CONNECT'`

### terminate_f()

`terminate_f() = fun((Reason::any(), Timeout::cloudi_service_api:timeout_terminate_value_milliseconds(), State::any()) -> ok)`

## Function Index

cloudi_service_handle_info/3 |
cloudi_service_handle_request/11 |
cloudi_service_init/4 |
cloudi_service_terminate/3 |

## Function Details

### cloudi_service_handle_info/3

`cloudi_service_handle_info(Request, State, Dispatcher) -> any()`

### 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()`

Generated by EDoc