InfluxEx.HTTP.Request (influx_ex v0.2.0)

A request to InfluxDB

Link to this section Summary

Link to this section Types

@type headers() :: [{binary(), binary()}]
@type method() :: :get | :post | :delete
@type opt() ::
  {:payload, term()}
  | {:method, method()}
  | {:query_params, map()}
  | {:handler, request_handler()}
@type payload() :: binary() | map()
Link to this type

request_handler()

@type request_handler() ::
  (InfluxEx.HTTP.Response.t() -> term() | {:error, InfluxEx.GenericError.t()})
@type t() :: %InfluxEx.HTTP.Request{
  endpoint: binary(),
  handler: request_handler() | nil,
  method: method(),
  payload: payload() | nil,
  query_params: map()
}
@type url() :: binary()

Link to this section Functions

Link to this function

new(endpoint, opts \\ [])

@spec new(binary(), [opt()]) :: t()

Make a new Request.t()

Link to this function

run(request, client)