Skip to content

Commit

Permalink
Use td::vector in HttpQuery.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: ecef0bd11150712bdb45e59a33cd0706dda2097d
  • Loading branch information
levlam committed Jun 13, 2020
1 parent 9e263be commit c022b1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tdnet/td/net/HttpQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
10 changes: 5 additions & 5 deletions tdnet/td/net/HttpQuery.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit c022b1c

Please sign in to comment.