Don't copy params
This commit is contained in:
@@ -21,7 +21,7 @@ class Request {
|
||||
void AddParam(const std::string_view& key, const std::string_view& value);
|
||||
void SetBody(const std::string_view& in);
|
||||
|
||||
const std::string& GetParam(const std::string& key);
|
||||
const std::string_view& GetParam(const std::string& key);
|
||||
const std::string_view& GetBody();
|
||||
|
||||
void WriteHeader(const std::string_view& name, const std::string_view& value);
|
||||
@@ -36,7 +36,7 @@ class Request {
|
||||
Connection *conn_;
|
||||
uint16_t request_id_ = 0;
|
||||
|
||||
std::unordered_map<std::string, std::string> params_;
|
||||
std::unordered_map<std::string_view, std::string_view> params_;
|
||||
std::string_view body_;
|
||||
|
||||
firebuf::Buffer out_buf_;
|
||||
|
||||
Reference in New Issue
Block a user