View Source K8s.Client.Provider behaviour (k8s v1.1.1)

HTTP Request / Response provider behaviour

Link to this section Summary

Callbacks

Handle HTTP Responses

Generate headers for HTTP Requests

Deprecated! Use headers/1 instead

Link to this section Types

Specs

Specs

response_t() :: success_t() | error_t()

Specs

success_t() :: {:ok, [map()] | map() | reference() | binary() | [binary()]}

Link to this section Callbacks

Specs

handle_response(
  {:ok, HTTPoison.Response.t() | HTTPoison.AsyncResponse.t()}
  | {:error, HTTPoison.Error.t()}
) :: response_t()

Handle HTTP Responses

Specs

Generate headers for HTTP Requests

Specs

headers(atom(), K8s.Conn.RequestOptions.t()) :: [{binary(), binary()}]

Deprecated! Use headers/1 instead

Link to this callback

request(atom, binary, binary, keyword, keyword)

View Source

Specs

request(atom(), binary(), binary(), keyword(), keyword()) :: response_t()

Perform HTTP Requests