mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-14 17:49:11 +02:00
36 lines
673 B
Text
36 lines
673 B
Text
---
|
|
title: dependencies
|
|
sidebarTitle: dependencies
|
|
---
|
|
|
|
# `fastmcp.server.dependencies`
|
|
|
|
## Functions
|
|
|
|
### `get_context`
|
|
|
|
```python
|
|
get_context() -> Context
|
|
```
|
|
|
|
### `get_http_request`
|
|
|
|
```python
|
|
get_http_request() -> Request
|
|
```
|
|
|
|
### `get_http_headers`
|
|
|
|
```python
|
|
get_http_headers(include_all: bool = False) -> dict[str, str]
|
|
```
|
|
|
|
|
|
Extract headers from the current HTTP request if available.
|
|
|
|
Never raises an exception, even if there is no active HTTP request (in which case
|
|
an empty dict is returned).
|
|
|
|
By default, strips problematic headers like `content-length` that cause issues if forwarded to downstream clients.
|
|
If `include_all` is True, all headers are returned.
|
|
|