Remove http prefix

This commit is contained in:
Chunting Gu
2019-04-18 13:40:36 +08:00
parent 2ea04b9705
commit e621025cc3
66 changed files with 997 additions and 1047 deletions
+7 -7
View File
@@ -30,9 +30,9 @@ bool ReadFile(const Path& path, std::string* output);
// -----------------------------------------------------------------------------
typedef std::pair<std::string, std::string> HttpHeader;
using Header = std::pair<std::string, std::string>;
class HttpHeaders {
class Headers {
public:
std::size_t size() const {
return headers_.size();
@@ -42,7 +42,7 @@ public:
return headers_.empty();
}
const std::vector<HttpHeader>& data() const {
const std::vector<Header>& data() const {
return headers_;
}
@@ -53,7 +53,7 @@ public:
bool Has(const std::string& key) const;
// Get header by index.
const HttpHeader& Get(std::size_t index) const {
const Header& Get(std::size_t index) const {
assert(index < size());
return headers_[index];
}
@@ -68,9 +68,9 @@ public:
}
private:
std::vector<HttpHeader>::iterator Find(const std::string& key);
std::vector<Header>::iterator Find(const std::string& key);
std::vector<HttpHeader> headers_;
std::vector<Header> headers_;
};
// -----------------------------------------------------------------------------
@@ -261,7 +261,7 @@ private:
// Headers generated from the above properties.
// Only Used to prepare payload.
HttpHeaders headers_;
Headers headers_;
std::string data_;
};