mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
Add optional callbacks
Mostly useful for REST, which has a ton. This is an initial commit, it still needs to be tested, but it's time to sleep.
This commit is contained in:
parent
dd1eaee0cd
commit
e25634cd9d
5 changed files with 192 additions and 5 deletions
|
@ -290,6 +290,10 @@ the same format as the etag header, including quotes.
|
|||
* Value type: true | {false, AuthHeader}
|
||||
* Default value: true
|
||||
|
||||
Types:
|
||||
|
||||
* AuthHead = iodata()
|
||||
|
||||
Return whether the user is authorized to perform the action.
|
||||
|
||||
This function should be used to perform any necessary
|
||||
|
@ -380,6 +384,10 @@ the request body, which is processed later.
|
|||
* Value type: {true, URL} | false
|
||||
* Default value: false
|
||||
|
||||
Types:
|
||||
|
||||
* URL = iodata()
|
||||
|
||||
Return whether the resource was permanently moved.
|
||||
|
||||
If it was, its new URL is also returned and sent in the
|
||||
|
@ -391,6 +399,10 @@ location header in the response.
|
|||
* Value type: {true, URL} | false
|
||||
* Default value: false
|
||||
|
||||
Types:
|
||||
|
||||
* URL = iodata()
|
||||
|
||||
Return whether the resource was temporarily moved.
|
||||
|
||||
If it was, its new URL is also returned and sent in the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue