plug_require_header
plug_require_header copied to clipboard
Make the action taken when a required header is missing configurable.
- [ ] given an
atom
-> look up thePlug.Conn.Status
code. - [ ] given an
integer
-> treat it as a status code. - [x] given a
function
-> invoke the function and pass it theconn
struct and the missing header/connection key pair. Check the arity. - [ ] given a content-type and a body, respond using that content-type and body.
Partially being addressed by #3.
Addressed by #4