httpipe
httpipe copied to clipboard
Register Before Execute
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.