mirror of
https://github.com/lifegpc/c-utils.git
synced 2026-06-06 13:18:57 +08:00
Update
This commit is contained in:
@@ -1028,3 +1028,18 @@ std::string dumpCookie(std::map<std::string, std::string> cookie) {
|
||||
}
|
||||
return re;
|
||||
}
|
||||
|
||||
std::string Request::toUri() {
|
||||
std::string re;
|
||||
if (this->https) {
|
||||
re += "https://";
|
||||
} else {
|
||||
re += "http://";
|
||||
}
|
||||
re += this->host;
|
||||
if (this->port != (this->https ? "https" : "http")) {
|
||||
re += ":" + this->port;
|
||||
}
|
||||
re += this->path;
|
||||
return re;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user