From 2eaac52a034355f42e370878659ed17d92f08f2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Gallego=20Rodr=C3=ADguez?= Date: Wed, 21 Aug 2019 10:15:55 +0200 Subject: [PATCH] Less errors, less complex. --- spec/README.md | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/spec/README.md b/spec/README.md index 7fd5436..6f98980 100644 --- a/spec/README.md +++ b/spec/README.md @@ -243,19 +243,7 @@ Accepts JSON data that defines a new route to be appended to the current routes. ``` * **Error Responses**: * **Code**: `400 Malformed JSON` - * **Code**: `422 Invalid Data Type` * **Code**: `422 Invalid Route Spec` - * **Code**: `422 Missing Mandatory Field`
- **Header**: `Content-Type: application/json`
- **Content**:
- ```json - { - "missing_mandatory_fields": [ - "url_pattern", - "command" - ] - } - ``` * **Sample Call**:
```sh $ curl -X POST --data-binary @- $KAPOW_URL/routes < - **Header**: `Content-Type: application/json`
- **Content**:
- ```json - { - "missing_mandatory_fields": [ - "url_pattern", - "command" - ] - } - ``` - * **Code**: `422 Invalid Index Type` * **Sample Call**:
```sh $ curl -X PUT --data-binary @- $KAPOW_URL/routes < - **Notes**: Check the list of valid resource paths at the top of this section. - * **Code**: `404 Handler Not Found` - * **Code**: `404 Name Not Found`
- **Notes**: Although the resource path is correct, no such name is present in the request. For instance, `/request/headers/Foo`, when no `Foo` header is not present in the request. + * **Code**: `400 Invalid Resource` + * **Code**: `404 Not Found` * **Sample Call**:
```sh $ curl -X --data-binary '

Hello!

' PUT /handlers/$KAPOW_HANDLER_ID/response/body ``` -* **Notes**: ## Usage Example