🏗️」 wip(requests): requests parsing and basic handling of GET responses

This commit is contained in:
y-syo
2025-02-03 18:39:23 +01:00
parent 35956dc13e
commit 4fbaed787d
8 changed files with 336 additions and 13 deletions

View File

@ -0,0 +1,27 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* HttpRequest.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/03 17:23:00 by mmoussou #+# #+# */
/* Updated: 2025/02/03 18:11:29 by mmoussou ### ########.fr */
/* */
/* ************************************************************************** */
#pragma once
#ifndef __REQUESTS_HTTP_REQUEST_HPP__
# define __REQUESTS_HTTP_REQUEST_HPP__
struct HttpRequest {
std::string method;
std::string target;
std::string protocol;
std::map<std::string, std::string> headers;
std::string body;
};
HttpRequest parseRequest(const std::string &rawRequest);
#endif