Skip to content

example for adjusting server timeout incomplete #231

@ltalirz

Description

@ltalirz

The docs example for adjusting the server timeout is both incomplete and not quite correct.

  • The docs say the default timeout is 5s (also here), but the actual timeout is 10s

self._http_client = http_client or httpx.AsyncClient(
transport=httpx.ASGITransport(app=self.fastapi, raise_app_exceptions=False),
base_url=self._base_url,
timeout=10.0,
)

  • Following the example results in a broken server (error Request URL is missing an 'http://' or 'https://' protocol.) because the base url is not set. One needs to copy the default http client setup from above for a working adjustment of timeout

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions