From 8fa918061cc47562f32d02733c4f0a6f79eaa709 Mon Sep 17 00:00:00 2001 From: mmpleake Date: Tue, 20 Oct 2020 18:18:36 -0700 Subject: [PATCH] Update exampleusage.md Specifying the header appears to be required otherwise it will fail with a 405 error. Adding to the curl -H 'Content-Type: application/json' works properly. --- docs/exampleusage.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/exampleusage.md b/docs/exampleusage.md index b73b237e..1cc8269f 100644 --- a/docs/exampleusage.md +++ b/docs/exampleusage.md @@ -26,10 +26,10 @@ store the JSON data: ``` Then, provide the contents of the new file as the body for a HTTP PUT request -using the `curl` command: +using the `curl` command with the HTTP header specified: ```sh -curl -X PUT -T create.json 'http://localhost:8121/users' +curl -H 'Content-Type: application/json' -X PUT -T create.json 'http://localhost:8121/users' ``` ### Reading an Object @@ -138,7 +138,7 @@ Then, provide the contents of the new file as the body for a HTTP POST request using the `curl` command: ```sh -curl -X POST -T update.json 'http://localhost:8121/users?last_name=Doe&first_name=John' +curl -H 'Content-Type: application/json' -X POST -T update.json 'http://localhost:8121/users?last_name=Doe&first_name=John' ``` Finally, verify the modifications by retrieving the most recent version of the