blob: 087b1c023066abe8811a31fe69266c579e51f587 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#ifndef _REQUEST_H_
#define _REQUEST_H_
#include "molerat.h"
#include "url.h"
enum RequestKind { GET, PUT, DEL };
struct request {
enum RequestKind kind;
struct url url;
struct key *keys;
};
/**
* Convert a `struct request` to a string of chars that can be sent over the
* network.
*
* WARNING: Printing the screen won't work because the request ends in two
* \r\n's
*/
char *request_to_string(struct request *request);
#endif
|