InfluxEx.HTTP behaviour (influx_ex v0.2.0)

Behaviour for HTTP clients

By default InfluxEx will try to use the Mojito library to make HTTP requests, however, if you prefer or use another HTTP library you can implement this behaviour for your HTTP library to integer with InfluxEx

Link to this section Summary

Types

t()

A module that implements the HTTP behaviour

Link to this section Types

Link to this type

status_code()

@type status_code() :: 100..599
@type t() :: module()

A module that implements the HTTP behaviour

Link to this section Callbacks

Link to this callback

send_request( method, url, headers, arg4 )

Send a request

InfluxEx tries to all the heavy lifting for you, so you only have to worry about sending the request.

For building the response you only need to pass through the status code and the body. You don't need to worry about parsing the body as InfluxEx can handle that in a generic way.