Skip to content

Commit

Permalink
Reverted changes where I had just...changed the placement of variable…
Browse files Browse the repository at this point in the history
… assisgments.
  • Loading branch information
YBTopaz8 committed Dec 23, 2024
1 parent ea218b3 commit 9b4e168
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Parse/Infrastructure/Execution/UniversalWebClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,10 @@ public async Task<Tuple<HttpStatusCode, string>> ExecuteAsync(

HttpRequestMessage message = new HttpRequestMessage(new HttpMethod(httpRequest.Method), httpRequest.Target);

if ((httpRequest.Data is null && httpRequest.Method.ToLower().Equals("post")
? new MemoryStream(new byte[0])
: httpRequest.Data) is Stream { } data)
Stream data = httpRequest.Data;
if (data != null || httpRequest.Method.Equals("POST", StringComparison.OrdinalIgnoreCase))
{
message.Content = new StreamContent(data);
message.Content = new StreamContent(data ?? new MemoryStream(new byte[0]));
}

if (httpRequest.Headers != null)
Expand Down

0 comments on commit 9b4e168

Please sign in to comment.