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

Query Parameter #35

Closed
fgiudici95 opened this issue Apr 20, 2022 · 2 comments
Closed

Query Parameter #35

fgiudici95 opened this issue Apr 20, 2022 · 2 comments
Labels
question Further information is requested

Comments

@fgiudici95
Copy link

Hi,

Does this library support the usage of the query parameters?
(example: POST http://127.0.0.1:8000/api/v1/jsonrpc?skip=10)

If yes, can you provide an example?

Thank you!
Fabio

@smagafurov
Copy link
Owner

smagafurov commented Aug 10, 2022

yes

see fastapi examples

@smagafurov
Copy link
Owner

smagafurov commented Aug 10, 2022

Something like this I guess:

def get_skip(
    skip: int = 0,
) -> int:
    return skip

api_v1 = Entrypoint(
    '/api/v1/jsonrpc',
    dependencies=[Depends(get_skip)],
)

@api_v1.method()
def some_method(
    skip: int = Depends(get_skip),
) -> int:
    return skip

@spumer spumer added the question Further information is requested label Sep 8, 2022
@spumer spumer closed this as completed Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants