From de50d266209d40aeb08a38e7e3383a030230d712 Mon Sep 17 00:00:00 2001 From: ruv Date: Mon, 16 Jul 2018 06:11:14 +0300 Subject: [PATCH] Add documentation about HTTP Hooks status code HTTP Status Code meaning was missed. Source code reference: https://github.com/tus/tusd/blob/311cdf253e50a21b12c0cae094ed0c2d20c66d5c/cmd/tusd/cli/hooks.go#L137 --- docs/hooks.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/hooks.md b/docs/hooks.md index cfa3e47..e51038f 100644 --- a/docs/hooks.md +++ b/docs/hooks.md @@ -99,6 +99,9 @@ $ tusd --hooks-http http://localhost:8081/write Note that the URL must include the `http://` prefix! +In case of a blocking hook, HTTP Status Code 400 or greater tells tusd to reject the request (in the same way as non-zero exit code for File Hooks). See also [issue #170](https://github.com/tus/tusd/issues/170) regarding further improvements. + + ### Usage Tusd will issue a `POST` request to the specified URL endpoint, specifying the hook name, such as pre-create or post-finish, in the `Hook-Name` header and following body: