-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequests.hpp
More file actions
21 lines (15 loc) · 772 Bytes
/
requests.hpp
File metadata and controls
21 lines (15 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef _REQUESTS_
#define _REQUESTS_
#include "nlohmann/json.hpp"
using namespace std;
using json_t = nlohmann::json;
// Computes and returns a DELETE request.
char *compute_delete_request(string host, string url, string query_params,
const string& cookie, const string& JWT_token);
// Computes and returns a GET request string (query_params
// and cookies can be set to NULL if not needed)
char *compute_get_request(const char *host, char *url, char *query_params,
const string &cookies, int cookies_count, const string& token);
// Computes and returns a POST request string (cookies can be NULL if not needed)
char *compute_post_request(const char *host, char *url, char* content_type, json_t *json, const string& token);
#endif