Skip to content

Register Before Execute #6

@DavidAntaramian

Description

@DavidAntaramian

Should it be possible to register functions that should be called before a connection is executed in order to modify the request in some fashion?

The specification would look something like this, allowing for both anonymous functions and named functions:

@type before_execute_fun :: (HTTPipe.Request.t -> HTTPipe.Request.t)
@spec register_before_execute(HTTPipe.Conn.t, before_execute_fun) :: Conn.t
@spec register_before_execute(HTTPipe.Conn.t, module, atom) :: Conn.t

In the second case, the atom would refer to a single-arity function in the given module with a spec of (HTTPipe.Request.t) :: HTTPipe.Request.t.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions