Skip to content

Commit

Permalink
Updated earthquake_bot example
Browse files Browse the repository at this point in the history
Updated Api
  • Loading branch information
baderouaich committed Sep 30, 2023
1 parent 0537a5a commit 4e6aa87
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
8 changes: 7 additions & 1 deletion examples/earthquake_bot/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
## earthquake_bot
This example shows how to program a Telegram Bot that will alert you if there is a recent earthquake somewhere in the world.
This example shows how to program a Telegram Bot that will alert you if there is a recent earthquake somewhere in the world.

## Commands
![Commands](commands.jpg)

## Alerts
![Alerts](alerts.jpg)
Binary file added examples/earthquake_bot/alerts.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/earthquake_bot/commands.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions src/Api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ nl::json Api::sendRequest(const std::string &endpoint, const cpr::Multipart &dat
if (isMultipart) {
session.SetMultipart(data);
session.UpdateHeader(cpr::Header{{{"Content-Type", "multipart/form-data"}}});
} else {
session.UpdateHeader(cpr::Header{{{"Content-Type", "application/x-www-form-urlencoded"}}});
}

cpr::Response res = isMultipart ? session.Post() : session.Get();
Expand Down

0 comments on commit 4e6aa87

Please sign in to comment.