supported request headers operation

This commit is contained in:
Axios
2019-12-16 23:19:52 +08:00
committed by GitHub
parent 895d40a767
commit 175996b239
9 changed files with 71 additions and 31 deletions

View File

@@ -119,6 +119,14 @@ HttpRequest RpcServiceClient::buildHttpRequest(const std::string & endpoint,
request.setConnectTimeout(configuration().connectTimeout());
}
for (const auto &h : msg.headers())
{
if (!h.second.empty())
{
request.setHeader(h.first, h.second);
}
}
if (msg.readTimeout() != kInvalidTimeout) {
request.setReadTimeout(msg.readTimeout());
} else {