From 82c9543273bd3aa1a7dfc17a45b4a25b3f5ead38 Mon Sep 17 00:00:00 2001 From: jjangga Date: Sun, 13 May 2018 21:25:41 +0900 Subject: [PATCH] fix curl command s As POST of curl uses 'application/x-www-form-urlencoded' as default 'Content-Type', explicitly configuring "-H 'Content-Type: application/json'" is needed. --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 71f6400..c20fa37 100644 --- a/README.md +++ b/README.md @@ -133,15 +133,16 @@ curl -XPOST 'https://:your_server_url/message' -d '{ "user_key": "encryptedUserKey", "type": "text", "content": "차량번호등록" -}' +}' -H 'Content-Type: application/json' ``` ``` -curl -XPOST 'https://your_server_url/message' -d '{ +curl -XPOST 'https://:your_server_url/message' -d '{ "user_key": "encryptedUserKey", "type": "photo", "content": "http://photo_url/number.jpg" -}' +}' -H 'Content-Type: application/json' ``` + - **Response** | 필드명 | 타입 | 필수여부 | 설명 | @@ -201,7 +202,7 @@ curl -XPOST 'https://your_server_url/message' -d '{ - **예제** - *친구 추가* ``` -curl -XPOST 'https://:your_server_url/friend' -d '{"user_key" : "HASHED_USER_KEY" }' +curl -XPOST 'https://:your_server_url/friend' -d '{"user_key" : "HASHED_USER_KEY" }' -H 'Content-Type: application/json' ``` - *친구 삭제* ```