Skip to content

Commit fd0ab0f

Browse files
committed
fix README examples for conn->post, conn->put
this fixes mrtazz#58
1 parent ad96b12 commit fd0ab0f

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,13 @@ conn->AppendHeader("X-MY-HEADER", "foo")
7777
conn->SetCAInfoFilePath("/etc/custom-ca.crt")
7878

7979
RestClient::Response r = conn->get("/get")
80-
RestClient::Response r = conn->post("/post", "text/json", "{\"foo\": \"bla\"}")
81-
RestClient::Response r = conn->put("/put", "text/json", "{\"foo\": \"bla\"}")
8280
RestClient::Response r = conn->del("/delete")
8381

82+
// set different content header for POST and PUT
83+
conn->AppendHeader("Content-Type", "text/json")
84+
RestClient::Response r = conn->post("/post", "{\"foo\": \"bla\"}")
85+
RestClient::Response r = conn->put("/put", "text/json", "{\"foo\": \"bla\"}")
86+
8487
// deinit RestClient. After calling this you have to call RestClient::init()
8588
// again before you can use it
8689
RestClient::disable();

0 commit comments

Comments
 (0)