View Source CozyAliyunOpenAPI.HTTPRequest (cozy_aliyun_open_api v0.1.2)

A struct representing an HTTP request.

Link to this section Summary

Types

Optional request body.

Request headers.

Request host.

Request method.

Request path.

Optional request query.

Request scheme.

t()

Functions

Creates an HTTP request struct from specs.

Creates an HTTP request struct.

Parses an URL, then takes the scheme, host, port and path.

Link to this section Types

@type body() :: iodata() | nil

Optional request body.

@type headers() :: %{optional(name :: String.t()) => value :: String.t()}

Request headers.

@type host() :: String.t()

Request host.

@type method() :: String.t()

Request method.

@type path() :: String.t()

Request path.

@type query() :: %{
  optional(name :: String.t()) => value :: boolean() | number() | String.t()
}

Optional request query.

@type scheme() :: String.t()

Request scheme.

@type t() :: %CozyAliyunOpenAPI.HTTPRequest{
  body: body(),
  headers: headers(),
  host: host(),
  method: method(),
  path: path(),
  port: :inet.port_number(),
  query: query(),
  scheme: scheme()
}

Link to this section Functions

Creates an HTTP request struct from specs.

Creates an HTTP request struct.

Parses an URL, then takes the scheme, host, port and path.