AzureSDK.Core.Request (Azure SDK v0.1.0)

Copy Markdown View Source

Service-agnostic HTTP request representation consumed by the AzureSDK pipeline.

Summary

Functions

Appends query parameters.

Merges headers into the request.

Creates a new request struct.

Sets or replaces a header value.

Returns the full URL path including query string.

Types

t()

@type t() :: %AzureSDK.Core.Request{
  body: iodata() | nil,
  headers: %{required(String.t()) => String.t()},
  metadata: map(),
  method: atom(),
  operation: atom(),
  path: String.t(),
  query: [{String.t(), String.t()}],
  service: atom(),
  stream: Enumerable.t() | nil
}

Functions

append_query(request, params)

@spec append_query(t(), [{String.t(), String.t()}]) :: t()

Appends query parameters.

merge_headers(request, headers)

@spec merge_headers(t(), map()) :: t()

Merges headers into the request.

new(fields)

@spec new(keyword()) :: t()

Creates a new request struct.

put_header(request, key, value)

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

Sets or replaces a header value.

url_path(request)

@spec url_path(t()) :: String.t()

Returns the full URL path including query string.