Files
42_INT_12_webserv/srcs/webserv/parsing_message_http.hpp
hugogogo 9a379c835d correction of trim in case of str only fill with delim char
+ added a new split, that also does trim, to split without counting newlines
2022-08-10 20:01:23 +02:00

37 lines
621 B
C++

#ifndef PARSING_MESSAGE_HTTP_HPP
# define PARSING_MESSAGE_HTTP_HPP
# include <iostream>
# include <string>
# include <vector>
# include <map>
# include "utils.hpp"
std::vector<std::string>
parse_http_first_line(std::string message);
std::map<std::string, std::string>
parse_http_headers(std::string message);
std::string
parse_http_body(std::string message);
bool
maybe_http_first_line(std::string);
// http message structure :
//
// start-line
// request-line
// method SP target SP version
// response-line
// version SP status SP reason
// header-fields
// name ":" SP value
// CRLF
// body
#endif