Skip to content

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

Open

Description

@kanghyojun

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.

Activity

  1. self-assigned this
    on Dec 1, 2016
  2. 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[/+] on Dec 2, 2016
  3. kanghyojun commented on Dec 16, 2016

    @kanghyojun
    MemberAuthor

    DONE

  4. reopened this on Jun 20, 2017
  5. dahlia commented on Jun 20, 2017

    @dahlia
    Member

    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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions