Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
Loading...
Searching...
No Matches
MultipartForm.hpp
Go to the documentation of this file.
1#pragma once
3#include <string>
4#include <string_view>
5#include <unordered_map>
6#include <vector>
7
8namespace orbit::http {
9
14 std::string name;
15 std::string filename;
16 std::string content_type;
17 std::string_view content;
18};
19
24public:
25 std::unordered_map<std::string, std::string> fields;
26 std::vector<MultipartFile> files;
27
34 static MultipartForm parse(std::string_view content_type_header, std::string_view body);
35};
36
37} // namespace http
Represents parsed multipart/form-data content.
Definition MultipartForm.hpp:23
std::vector< MultipartFile > files
Definition MultipartForm.hpp:26
static MultipartForm parse(std::string_view content_type_header, std::string_view body)
Parses a multipart/form-data request body.
std::unordered_map< std::string, std::string > fields
Definition MultipartForm.hpp:25
Definition Task.hpp:10
Represents a file uploaded via multipart/form-data.
Definition MultipartForm.hpp:13
std::string name
Definition MultipartForm.hpp:14
std::string content_type
Definition MultipartForm.hpp:16
std::string filename
Definition MultipartForm.hpp:15
std::string_view content
Definition MultipartForm.hpp:17