Kazan v0.11.0 Kazan.Request View Source

Kazan.Request is a struct that describes an HTTP request.

Users should mostly treat this struct as opaque - Kazan.run consumes it, and functions in the various Kazan.Apis submodules construct it.

Link to this section Summary

Functions

Creates a kazan request for a given operation

Link to this section Types

Link to this type t() View Source
t() :: %Kazan.Request{
  body: String.t(),
  content_type: String.t(),
  method: String.t(),
  path: String.t(),
  query_params: Map.t(),
  response_schema: atom() | nil
}

Link to this section Functions

Link to this function create(operation, params) View Source
create(String.t(), Map.t()) :: {:ok, t()} | {:error, atom()}

Creates a kazan request for a given operation.

Parameters

  • operation should be the nickname of an operation found in the swagger dict
  • params should be a Map of parameters to send in the request.