Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/littlstar/request.cc
Simple HTTP request lib backed by libcurl, inspired by superagent.
https://github.com/littlstar/request.cc
Last synced: about 2 months ago
JSON representation
Simple HTTP request lib backed by libcurl, inspired by superagent.
- Host: GitHub
- URL: https://github.com/littlstar/request.cc
- Owner: littlstar
- Created: 2015-02-27T20:32:26.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-04T19:13:33.000Z (almost 10 years ago)
- Last Synced: 2023-05-29T11:01:19.070Z (over 1 year ago)
- Language: C++
- Homepage:
- Size: 188 KB
- Stars: 11
- Watchers: 20
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# request.cc
Simple HTTP request lib backed by [libcurl](http://curl.haxx.se/libcurl/), inspired by [superagent](https://github.com/visionmedia/superagent).
## Example
```c++
#include
#include
#include "request.h"int
main(){
littlstar::Request *req = new littlstar::Request;
littlstar::Response *res = NULL;req->Get("https://littlstar.com/api/v1/videos");
req->Query("foo", "bar");
req->Set("X-ApiKey", "myapikey");
req->Accept("application/json");res = req->End();
assert(res->ok);
std::cout << res->data << std::endl;delete req;
delete res;return 0;
}
```## License
MIT