View Source AliyunOpenAPI.HTTP.Request (aliyun_open_api v0.6.0)

A struct representing an HTTP request.

Summary

Types

Optional request body.

Request headers.

Request host.

Request method.

Request path.

Optional request query.

Request scheme.

t()

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() :: %AliyunOpenAPI.HTTP.Request{
  body: body(),
  headers: headers(),
  host: host(),
  method: method(),
  path: path(),
  port: :inet.port_number(),
  query: query(),
  scheme: scheme()
}

Functions

Creates an HTTP request struct from spec.

Creates an HTTP request struct.

Link to this function

put_body(request, value)

View Source
Link to this function

put_header(request, name, fun)

View Source
Link to this function

put_new_header(request, name, fun)

View Source
Link to this function

put_new_query(request, name, fun)

View Source
Link to this function

put_query(request, name, fun)

View Source

Gets the url string of an HTTP request struct.