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

36 lines
585 B

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