Object-oriented libraries for working with HTTP and REST API
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.
api/lib/api.hpp

31 lines
527 B

1 year ago
#ifndef _API_
#define _API_
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include "http.hpp"
1 year ago
using namespace std;
class http_request;
class http_response;
1 year ago
class api {
public:
string method;
string path;
map<string, string> params;
string url;
1 year ago
string body;
// odlazni api zahtjev
api(const string _method, const string _path, const map<string, string> _params = {}, const string _body = {});
// dolazni api zahjtev
api(const http_request _req);
1 year ago
};
#endif