LuanDevecchi / requests

Biblioteca para requisições HTTP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Requests

C++ Windows-Based HTTP Library for facility and easiness

Code Building

Join us:

Join CodeBuilding

https://codebuilding.org

Examples

GET Request Example

#include <requests/http.h> // Let's include requests default header

requests::Request* request = resquests::get("httpbin.org/get");

printf( "%s", request->status_code.c_str() );

// Output:

200 OK

For the following php script:

<?php
echo $_POST['parameter1'];
echo $_POST['parameter2'];
?>

POST Request example

#include <requests/http.h>

requests::post_data data = {
  {"parameter1", "value1"},
  {"parameter2", "value2"}
};

requests::Request* request = requests::post( "localhost/example.php" , data );

printf( "%s", request->text.c_str() );

// Output:

value1value2

License

MIT Licensed.

About

Biblioteca para requisições HTTP

License:MIT License


Languages

Language:C++ 100.0%