View Source oidcc_http_util (Oidcc v3.2.6)

HTTP Client Utilities

Summary

Types

-type error() ::
          {http_error, StatusCode :: pos_integer(), HttpBodyResult :: binary() | map()} |
          {use_dpop_nonce, Nonce :: binary(), HttpBodyResult :: binary() | map()} |
          invalid_content_type |
          httpc_error().
Link to this type

http_header()

View Source (since 3.0.0)
-type http_header() :: {Field :: [byte()] | binary(), Value :: iodata()}.

See httpc:request/5.

Link to this type

httpc_error()

View Source (since 3.0.0)
-type httpc_error() :: term().

See httpc:request/5 for additional errors.

Link to this type

query_params()

View Source (since 3.0.0)
-type query_params() :: [{unicode:chardata(), unicode:chardata() | true}].

See uri_string:compose_query/1.

Link to this type

request_opts()

View Source (since 3.0.0)
-type request_opts() ::
          #{timeout => timeout(), ssl => [ssl:tls_option()], httpc_profile => atom() | pid()}.

See httpc:request/5.

Parameters

  • timeout - timeout for request
  • ssl - TLS config
Link to this type

telemetry_opts()

View Source (since 3.0.0)
-type telemetry_opts() :: #{topic := [atom()], extra_meta => map()}.

Functions

Link to this function

headers_to_cache_deadline(Headers, DefaultExpiry)

View Source
-spec headers_to_cache_deadline(Headers, DefaultExpiry) -> pos_integer()
                                   when
                                       Headers :: [{Header :: binary(), Value :: binary()}],
                                       DefaultExpiry :: non_neg_integer().