Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move link creation to fastapi dependency #402

Open
geospatial-jeff opened this issue May 17, 2022 · 1 comment
Open

Move link creation to fastapi dependency #402

geospatial-jeff opened this issue May 17, 2022 · 1 comment
Labels
api layer enhancement New feature or request

Comments

@geospatial-jeff
Copy link
Collaborator

Right now there is a starlette request object that is injected into each endpoint and the user is responsible for creating links. The starlette request object is available from within a fastapi dependency, so it may be easier to create links inside a dependency and inject these links into each endpoint.

@geospatial-jeff geospatial-jeff added api layer enhancement New feature or request labels Aug 4, 2022
@geospatial-jeff
Copy link
Collaborator Author

This is a good way to encapsulate all of the logic required to generate base URL for links including forwarding headers, router prefixes etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api layer enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant