Skip to content

Commit

Permalink
Added httpStatusCode & httpStatusText
Browse files Browse the repository at this point in the history
  • Loading branch information
andot committed May 4, 2019
1 parent c3fbea1 commit ce91f34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Hprose.RPC/HttpTransport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| |
| HttpTransport class for C#. |
| |
| LastModified: Feb 27, 2019 |
| LastModified: May 4, 2019 |
| Author: Ma Bingyao <[email protected]> |
| |
\*________________________________________________________*/
Expand Down Expand Up @@ -77,6 +77,8 @@ public async Task<Stream> Transport(Stream request, Context context) {
else {
response = await httpClient.PostAsync(clientContext.Uri, httpContext).ConfigureAwait(false);
}
context["httpStatusCode"] = response.StatusCode;
context["httpStatusText"] = response.ReasonPhrase;
if (response.IsSuccessStatusCode) {
context["httpResponseHeaders"] = response.Headers;
return await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
Expand Down

0 comments on commit ce91f34

Please sign in to comment.