You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
marcelb
beaddd239b
|
11 months ago | |
---|---|---|
lib | 11 months ago | |
src | 12 months ago | |
test | 11 months ago | |
.gitignore | 1 year ago | |
LICENSE | 1 year ago | |
README.md | 11 months ago | |
dependency | 1 year ago |
README.md
Rest client library, using libcurl
A small framework for simple client-side REST API requests for C++. It uses libcurl. It got its name from a play on the words curl and cpp.
Features
- Object oriented
- Adjustable headers
- Configurable user agent
- Adjustable timeout
- Native C++ containers: map, string
- QA object
- Curl and HTTP code status
- It is possible to turn off certificate validation
- A configurable version of the HTTP protocol
Installation
Just download the latest release and unzip it into your project. You can turn it on with:
#include "cppurl/lib/cppurl.hpp"
using namespace marcelb;
Usage
// init, and sets
Curl rest;
string header_value = "3849f438uf9uedu8ejweoijwejd09230";
rest.header("API", header_value).timeout(700)
.httpv(HTTP2).sslverifyoff();
// execute and print
cout << rest.get("https://reqres.in/api/users/2") << endl <<
"Curl status " << rest.curlStatus << endl <<
"HTTP status " << rest.httpStatus << endl;
for (auto header : rest.responseHeader) {
cout << header.first << " " << header.second << endl;
}
License
Support & Feedback
For support and any feedback, contact the address: marcelb96@yahoo.com.
Contributing
Contributions are always welcome!
Feel free to fork and start working with or without a later pull request. Or contact for suggest and request an option.