Klaviyo.Request (klaviyo v3.0.0)

HTTP request sent to an endpoint.

Link to this section Summary

Functions

Builds a Klaviyo.HTTP.Request struct.

Adds a new request header if not present. Otherwise, replaces the previous value.

Link to this section Types

@type t() :: %Klaviyo.Request{
  body: String.t(),
  headers: Klaviyo.HTTP.headers_t(),
  method: Klaviyo.HTTP.method_t(),
  private: map(),
  url: String.t()
}

Link to this section Functions

Link to this function

new(operation, opts)

Builds a Klaviyo.HTTP.Request struct.

Link to this function

put_header(request, key, value)

@spec put_header(t(), String.t(), String.t()) :: t()

Adds a new request header if not present. Otherwise, replaces the previous value.