-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
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.tIn 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.