Skip to content

Commit

Permalink
[dotnet] Add Execution Context
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrstnAnsl committed May 20, 2024
1 parent fdb9c27 commit a6c82f6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dotnet/src/webdriver/Remote/HttpCommandExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,20 @@ private async Task<HttpResponseInfo> MakeHttpRequest(HttpRequestInfo requestInfo
if (_logger.IsEnabled(LogEventLevel.Trace))
{
_logger.Trace($">> {requestMessage}");
if (requestMessage.Content != null)
{
string content = await requestMessage.Content.ReadAsStringAsync();
_logger.Trace($">> Body: {content}");
}
}

using (HttpResponseMessage responseMessage = await this.client.SendAsync(requestMessage).ConfigureAwait(false))
{
if (_logger.IsEnabled(LogEventLevel.Trace))
{
_logger.Trace($"<< {responseMessage}");
string responseBody = await responseMessage.Content.ReadAsStringAsync();
_logger.Trace($"<< Body: {responseBody}");
}

HttpResponseInfo httpResponseInfo = new HttpResponseInfo();
Expand All @@ -305,6 +312,7 @@ private async Task<HttpResponseInfo> MakeHttpRequest(HttpRequestInfo requestInfo
}
}


private Response CreateResponse(HttpResponseInfo responseInfo)
{
Response response = new Response();
Expand Down

0 comments on commit a6c82f6

Please sign in to comment.