Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
This API wrapper contains methods for interacting easily with ZeroBounce API.
More information about ZeroBounce you can find in the [official documentation](https://www.zerobounce.net/docs/).


## Security

- Keep API keys on a trusted server. Do not embed them in mobile apps or browser JavaScript that untrusted users can inspect.
- Custom API base URLs (when supported) must use `https://`. Do not pass end-user-controlled hosts into those settings.
- Request URLs include `api_key` as a query parameter (ZeroBounce API contract). Do not log full request URLs or enable payload debug logging in production.

## INSTALLATION
Before installing the wrapper, you have to make sure that `CMake` is installed on your system. It can be downloaded from [here](https://cmake.org/download/).

Expand Down
10 changes: 5 additions & 5 deletions include/ZeroBounce/ZeroBounce.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,19 @@ class BaseRequestHandler {
class RequestHandler : public BaseRequestHandler {
protected:
cpr::Response doGet(const cpr::Url& url) {
return cpr::Get(url);
return cpr::Get(url, cpr::Timeout{120000});
}
cpr::Response doGet(const cpr::Url& url, const cpr::Header& header) {
return cpr::Get(url, header);
return cpr::Get(url, header, cpr::Timeout{120000});
}
cpr::Response doGetWithParameters(const cpr::Url& url, const cpr::Parameters& parameters) {
return cpr::Get(url, parameters);
return cpr::Get(url, parameters, cpr::Timeout{120000});
}
cpr::Response doPost(const cpr::Url& url, const cpr::Header& header, const cpr::Body& body) {
return cpr::Post(url, header, body);
return cpr::Post(url, header, body, cpr::Timeout{120000});
}
cpr::Response doPost(const cpr::Url& url, const cpr::Header& header, const cpr::Multipart& multipart) {
return cpr::Post(url, header, multipart);
return cpr::Post(url, header, multipart, cpr::Timeout{120000});
}
};

Expand Down
Loading