Use td::vector in HttpQuery.
GitOrigin-RevId: ecef0bd11150712bdb45e59a33cd0706dda2097d
This commit is contained in:
parent
9e263be760
commit
c022b1c5a1
@ -24,8 +24,8 @@ MutableSlice HttpQuery::get_arg(Slice key) const {
|
||||
return it == args_.end() ? MutableSlice() : it->second;
|
||||
}
|
||||
|
||||
std::vector<std::pair<string, string>> HttpQuery::get_args() const {
|
||||
std::vector<std::pair<string, string>> res;
|
||||
td::vector<std::pair<string, string>> HttpQuery::get_args() const {
|
||||
td::vector<std::pair<string, string>> res;
|
||||
res.reserve(args_.size());
|
||||
for (auto &it : args_) {
|
||||
res.emplace_back(it.first.str(), it.second.str());
|
||||
|
@ -21,23 +21,23 @@ class HttpQuery {
|
||||
public:
|
||||
enum class Type : int8 { EMPTY, GET, POST, RESPONSE };
|
||||
|
||||
std::vector<BufferSlice> container_;
|
||||
td::vector<BufferSlice> container_;
|
||||
Type type_ = Type::EMPTY;
|
||||
int32 code_ = 0;
|
||||
MutableSlice url_path_;
|
||||
std::vector<std::pair<MutableSlice, MutableSlice>> args_;
|
||||
td::vector<std::pair<MutableSlice, MutableSlice>> args_;
|
||||
MutableSlice reason_;
|
||||
|
||||
bool keep_alive_ = true;
|
||||
std::vector<std::pair<MutableSlice, MutableSlice>> headers_;
|
||||
std::vector<HttpFile> files_;
|
||||
td::vector<std::pair<MutableSlice, MutableSlice>> headers_;
|
||||
td::vector<HttpFile> files_;
|
||||
MutableSlice content_;
|
||||
|
||||
Slice get_header(Slice key) const;
|
||||
|
||||
MutableSlice get_arg(Slice key) const;
|
||||
|
||||
std::vector<std::pair<string, string>> get_args() const;
|
||||
td::vector<std::pair<string, string>> get_args() const;
|
||||
|
||||
int get_retry_after() const;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user