-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequests.hpp
More file actions
18 lines (13 loc) · 782 Bytes
/
Copy pathrequests.hpp
File metadata and controls
18 lines (13 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef _REQUESTS_
#define _REQUESTS_
// computes and returns a GET request string (query_params
// and cookies can be set to NULL if not needed)
char *compute_get_request(char *host, char *url, char *query_params,
char **cookies, int cookies_count, char *token);
// computes and returns a POST request string (cookies can be NULL if not needed)
char *compute_post_request(char *host, char *url, char* content_type, char **body_data,
int body_data_fields_count, char** cookies, int cookies_count, char *token);
char *compute_delete_request(char *host, char *url, char *query_params,
char **cookies, int cookies_count, char *token);
char * parse_response(std::string command, char *response, std::string &output, int &aux_data);
#endif