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

Add ways to filter (or hook) request/response objects #46

Open
kanghyojun opened this issue Dec 1, 2016 · 2 comments
Open

Add ways to filter (or hook) request/response objects #46

kanghyojun opened this issue Dec 1, 2016 · 2 comments
Assignees

Comments

@kanghyojun
Copy link
Member

kanghyojun commented Dec 1, 2016

For more flexibility on transport layer, we need ways to filter (or hook) request/response objects:

  • RPC client should take a sort of hook callbacks that filter/map request/response objects.
    • For example, RPC client could add extra headers for custom authentication process through a hook on request objects.
  • RPC server should take a sort of middlewares that filter/map request/response objects.
    • For example, RPC server could add authentication process through verifying request headers on a hook.
@kanghyojun kanghyojun self-assigned this Dec 1, 2016
@dahlia dahlia changed the title Create method makes request object on RPC client, makes response object on RPC server Add ways to filter (or hook) request/response objects Dec 2, 2016
@kanghyojun
Copy link
Member Author

DONE

@dahlia dahlia reopened this Jun 20, 2017
@dahlia
Copy link
Member

dahlia commented Jun 20, 2017

It actually isn't done yet. We thought there should be 4 extension points i.e. (requests, response) × (client, server), but there currently are only two hooks (Client.make_request() and WsgiApp.make_response()).

In particular, response hook on client-side is necessary to extend transport layer. Because there's no extension point to urllib.request (that Client uses in the underlying) whereas server-side hooks can be replaced by WSGI middlewares. In fact, we are okay even if there are no server-side hooks.

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

No branches or pull requests

2 participants