@@ -222,7 +222,7 @@ class BaseHttpProxy(BaseProxyModel):
222222 """
223223
224224 @override
225- async def send_request_to_target ( # pyright: ignore [reportIncompatibleMethodOverride]
225+ async def send_request_to_target (
226226 self , * , request : StarletteRequest , target_url : httpx .URL
227227 ) -> StarletteResponse :
228228 """Change request headers and send request to target url.
@@ -318,6 +318,8 @@ class ReverseHttpProxy(BaseHttpProxy):
318318
319319 # # Examples
320320
321+ ## Basic usage
322+
321323 ```python
322324 from contextlib import asynccontextmanager
323325 from typing import AsyncIterator
@@ -341,7 +343,7 @@ async def close_proxy_event(_: FastAPI) -> AsyncIterator[None]: # (1)!
341343 async def _(request: Request, path: str = ""):
342344 return await proxy.proxy(request=request, path=path) # (3)!
343345
344- # Then run shell: `uvicorn <your.py >:app --host http:// 127.0.0.1:8000 --port 8000`
346+ # Then run shell: `uvicorn <your_py >:app --host 127.0.0.1 --port 8000`
345347 # visit the app: `http://127.0.0.1:8000/`
346348 # you will get the response from `http://www.example.com/`
347349 ```
@@ -452,6 +454,8 @@ class ForwardHttpProxy(BaseHttpProxy):
452454
453455 # # Examples
454456
457+ ## Basic usage
458+
455459 ```python
456460 from contextlib import asynccontextmanager
457461 from typing import AsyncIterator
@@ -476,7 +480,7 @@ async def close_proxy_event(_: FastAPI) -> AsyncIterator[None]:
476480 async def _(request: Request, path: str = ""):
477481 return await proxy.proxy(request=request, path=path)
478482
479- # Then run shell: `uvicorn <your.py >:app --host http:// 127.0.0.1:8000 --port 8000`
483+ # Then run shell: `uvicorn <your_py >:app --host 127.0.0.1 --port 8000`
480484 # visit the app: `http://127.0.0.1:8000/http://www.example.com`
481485 # you will get the response from `http://www.example.com`
482486 ```
0 commit comments