Skip to content

Commit bdf5335

Browse files
Hajder Rabieemrtazz
authored andcommitted
Changed content type to application/json
1 parent 731a212 commit bdf5335

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ verbs:
2424
#include "restclient-cpp/restclient.h"
2525

2626
RestClient::Response r = RestClient::get("http://url.com")
27-
RestClient::Response r = RestClient::post("http://url.com/post", "text/json", "{\"foo\": \"bla\"}")
28-
RestClient::Response r = RestClient::put("http://url.com/put", "text/json", "{\"foo\": \"bla\"}")
27+
RestClient::Response r = RestClient::post("http://url.com/post", "application/json", "{\"foo\": \"bla\"}")
28+
RestClient::Response r = RestClient::put("http://url.com/put", "application/json", "{\"foo\": \"bla\"}")
2929
RestClient::Response r = RestClient::del("http://url.com/delete")
3030
RestClient::Response r = RestClient::head("http://url.com")
3131
```
@@ -84,9 +84,9 @@ RestClient::Response r = conn->head("/get")
8484
RestClient::Response r = conn->del("/delete")
8585

8686
// set different content header for POST and PUT
87-
conn->AppendHeader("Content-Type", "text/json")
87+
conn->AppendHeader("Content-Type", "application/json")
8888
RestClient::Response r = conn->post("/post", "{\"foo\": \"bla\"}")
89-
RestClient::Response r = conn->put("/put", "text/json", "{\"foo\": \"bla\"}")
89+
RestClient::Response r = conn->put("/put", "application/json", "{\"foo\": \"bla\"}")
9090

9191
// deinit RestClient. After calling this you have to call RestClient::init()
9292
// again before you can use it

0 commit comments

Comments
 (0)