Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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