cs-3516-assignment-1/client/http_socket.h

20 lines
489 B
C

#ifndef HTTP_SOCKET_H
#define HTTP_SOCKET_H
#include "../common/http_types.h"
#include "../common/socket_helper.h"
#include <time.h>
#define HTTP_VERSION "HTTP/1.1"
struct response_info {
char *contents;
long long rtt;
};
struct http_message build_basic_request(const char *method, const char *host, const char *path, int port);
void free_basic_request(struct http_message req);
enum socket_result send_request(struct http_message req, struct response_info *res_info);
#endif