kashka v0.1.0 Kashka.Http View Source

Helper module-wrapper around Mint

Link to this section Summary

Link to this section Types

Link to this type

t()

View Source
t() :: %Kashka.Http{
  fix_host: boolean(),
  fix_port: boolean(),
  fix_schema: boolean(),
  headers: Mint.Types.headers(),
  keepalive: boolean(),
  mint: Mint.HTTP.t(),
  uri: URI.t()
}
Link to this type

url_with_opts()

View Source
url_with_opts() :: [
  url: url(),
  headers: Mint.Types.headers(),
  fix_host: boolean(),
  fix_port: boolean(),
  fix_schema: boolean(),
  keepalive: boolean()
]

Link to this section Functions

Link to this function

append_path(state, path)

View Source
Link to this function

close(http)

View Source
close(t()) :: :ok
Link to this function

connect(smth)

View Source
connect(args()) :: t()
Link to this function

reconnect_to(state, url)

View Source
reconnect_to(t(), String.t()) :: %Kashka.Http{
  fix_host: term(),
  fix_port: term(),
  fix_schema: term(),
  headers: term(),
  keepalive: term(),
  mint: term(),
  uri: term()
}
Link to this function

request(state, method, path, headers, body, timeout \\ 30000)

View Source
request(
  t() | args(),
  String.t(),
  String.t(),
  Mint.Types.headers(),
  iodata(),
  non_neg_integer()
) :: {:ok, t(), non_neg_integer(), iodata()}