Skip to content

Conversation

@hwelch-fle
Copy link
Contributor

Changes

Allow: Route.__call__(**call_options)

This allows a route to be changed when it is called. useful if we want to construct an endpoint and pass data later

Use **overrides in register_route

All parameters passed to the Route initilizer are now dumped into **overrides variadic.

if json_request:
    overrides['json'] = params
else:
    overrides['params'] = params
    
if isinstance(self.handler, HTTPX_Sync) and json_request:
    return SyncRoute(method, endpoint, self.handler, **overrides)

this fixes #9 and cleans up the branching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Updated parameter handling in routes.py

1 participant