# `ExMCP.Authorization.HTTPClient`
[🔗](https://github.com/azmaveth/ex_mcp/blob/v1.0.0/lib/ex_mcp/authorization/http_client.ex#L1)

HTTP client functionality for OAuth 2.1 requests.

This module handles the HTTP communication with OAuth authorization servers,
including token requests, introspection, and metadata discovery.

# `fetch_server_metadata`

```elixir
@spec fetch_server_metadata(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}
```

Fetches server metadata from the well-known endpoint.

Implements RFC 8414 OAuth 2.0 Authorization Server Metadata discovery.

# `make_introspection_request`

```elixir
@spec make_introspection_request(String.t(), map() | keyword(), keyword()) ::
  {:ok, map()} | {:error, term()}
```

Makes a token introspection request.

Used for validating access tokens with the authorization server.

# `make_token_request`

```elixir
@spec make_token_request(
  String.t(),
  keyword() | [{String.t(), String.t()}],
  keyword()
) ::
  {:ok, map()} | {:error, term()}
```

Makes a token request to the authorization server.

Handles both token exchange and refresh token requests with proper
error handling and response parsing.

---

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