新增支持http文件上传功能

This commit is contained in:
xiongziliang
2026-07-08 10:45:55 +08:00
parent b44e5b0731
commit 92681fe6e1
10 changed files with 181 additions and 10 deletions

View File

@@ -130,12 +130,17 @@ const string &Parser::content() const {
return _content;
}
const HttpBody::Ptr &Parser::body() const {
return _body;
}
void Parser::clear() {
_method.clear();
_url.clear();
_params.clear();
_protocol.clear();
_content.clear();
_body = nullptr;
_headers.clear();
_url_args.clear();
}
@@ -152,6 +157,10 @@ void Parser::setContent(string content) {
_content = std::move(content);
}
void Parser::setBody(HttpBody::Ptr body) {
_body = std::move(body);
}
StrCaseMap &Parser::getHeader() const {
return _headers;
}