Skip to content

Commit

Permalink
do not specify content for get requests (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzzerd committed Jun 5, 2023
1 parent f3402ee commit 418b598
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/FMData.Rest/FileMakerRestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -720,10 +720,13 @@ public override async Task<string> RunScriptAsync(string layout, string script,
// this hack is backward compatible for FMS17
httpContent.Headers.ContentType.CharSet = null;

var httpRequest = new HttpRequestMessage(method, requestUri)
var httpRequest = new HttpRequestMessage(method, requestUri);

// don't include body content on requests for http get
if (method != HttpMethod.Get)
{
Content = httpContent,
};
httpRequest.Content = httpContent;
}

// include our authorization header
httpRequest.Headers.Authorization = _authHeader;
Expand Down

0 comments on commit 418b598

Please sign in to comment.