# `oidcc_http_util`
[🔗](https://github.com/erlef/oidcc/blob/aa212d52d0140addf057c34917b734647401b34e
/src/oidcc_http_util.erl#L4)

HTTP Client Utilities

# `error`
*since 3.0.0* 

```erlang
-type error() ::
          {http_error, StatusCode :: non_neg_integer(), HttpBodyResult :: binary() | map()} |
          {use_dpop_nonce, Nonce :: binary(), HttpBodyResult :: binary() | map()} |
          invalid_content_type |
          {invalid_json, Reason :: term()} |
          httpc_error().
```

# `http_header`
*since 3.0.0* 

```erlang
-type http_header() :: {Field :: [byte()] | binary(), Value :: iodata()}.
```

HTTP header representation used by OIDCC.

# `httpc_error`
*since 3.0.0* 

```erlang
-type httpc_error() :: term().
```

Transport error. The default adapter returns errors documented by `httpc:request/5`.

# `query_params`
*since 3.0.0* 

```erlang
-type query_params() :: [{unicode:chardata(), unicode:chardata() | true}].
```

See `uri_string:compose_query/1`.

# `request_opts`
*since 3.0.0* 

```erlang
-type request_opts() ::
          #{timeout => timeout(),
            ssl => [ssl:tls_option()],
            httpc_profile => atom() | pid(),
            http_adapter => oidcc_http_adapter:config()}.
```

See `httpc:request/5`.

## Parameters

* `timeout` - timeout for request
* `ssl` - TLS config
* `httpc_profile` - `httpc` profile used by the default adapter
* `http_adapter` - `{AdapterModule, AdapterConfigMap}` transport adapter

# `telemetry_opts`
*since 3.0.0* 

```erlang
-type telemetry_opts() :: #{topic := [atom()], extra_meta => map()}.
```

# `headers_to_cache_deadline`

```erlang
-spec headers_to_cache_deadline(Headers, DefaultExpiry) -> non_neg_integer()
                                   when
                                       Headers :: [oidcc_http_adapter:header()],
                                       DefaultExpiry :: pos_integer().
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
