Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wolgemoth/curl-wrapper
A C++ wrapper for libcurl with a cleaner scripting interface and async functionality.
https://github.com/wolgemoth/curl-wrapper
async asynchronous concurrency concurrent cpp cpp17 curl encapsulation header-only http https libcurl networking protocol requests rest rest-api restful-api web
Last synced: about 8 hours ago
JSON representation
A C++ wrapper for libcurl with a cleaner scripting interface and async functionality.
- Host: GitHub
- URL: https://github.com/wolgemoth/curl-wrapper
- Owner: wolgemoth
- License: mit
- Created: 2024-05-01T15:38:25.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-05-01T16:10:31.000Z (9 months ago)
- Last Synced: 2024-12-12T11:13:48.142Z (about 2 months ago)
- Topics: async, asynchronous, concurrency, concurrent, cpp, cpp17, curl, encapsulation, header-only, http, https, libcurl, networking, protocol, requests, rest, rest-api, restful-api, web
- Language: C++
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CURL Wrapper (Requests.hpp)
### About
This is a a C++ wrapper for libcurl that provides a cleaner scripting interface and support for asynchronous requests.
It works on a RAII basis and hides any raw pointers exposed by the CURL library through the use of encapsulation. It also provides several utility functions such as checking the status of a request.
If you find a bug or have a feature-request, please raise an issue.
### Example
```cpp
(On program start ...)
Networking::Requests::Init();(Runtime...)
auto message = Networking::Requests::Client(query);
message.Set(CURLOPT_TIMEOUT, 20);auto response = message.Send();
(Finalisation...)
Networking::Requests::Dispose();
```### Dependencies
#### [libcurl](https://curl.se/libcurl/)
### Instructions
The implementation is header-only and written in templated C++17. You should need not need to make any adjustments to your project settings or compiler flags.
Simply include the header and dependencies in your project and you are ready to start!