Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
imrehorvath authored Aug 14, 2022
1 parent a8de247 commit 55aae07
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ void setup() {

client.enableInsecure(); // Using HTTPS and peer cert. will not be able to auth.

client.postAsync("https://httpbin.org/post", "{\"key\":\"value\"}");
String data = "{\"sensorData\":\"";
data += 123;
data += "\"}";
client.postAsync("https://httpbin.org/post", data);
SerialUSB.print("Sending request");
}

Expand Down Expand Up @@ -172,7 +175,10 @@ __Synchronous requests__
client.get("https://httpbin.org/headers");

// HTTP POST a JSON payload, call won't return until finished
client.post("https://httpbin.org/post", "{\"key\":\"value\"}");
String data = "{\"sensorData\":\"";
data += 123;
data += "\"}";
client.post("https://httpbin.org/post", data);
```

__Asynchronous requests__
Expand Down

0 comments on commit 55aae07

Please sign in to comment.