molehole/include/request.h

23 lines
442 B
C
Raw Normal View History

2024-07-23 21:48:28 +00:00
#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