Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Fix content-length issue for get requests. Close #354. Close #99.
Browse files Browse the repository at this point in the history
  • Loading branch information
ufna committed Aug 26, 2021
1 parent 8b673bd commit acbad67
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/VaRest/Private/VaRestRequestJSON.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,12 @@ void UVaRestRequestJSON::ProcessRequest()
{
HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json"));

// Body is ignored for get requests, so we shouldn't place json into it even if it's empty
if(RequestVerb == EVaRestRequestVerb::GET)
{
break;
}

// Serialize data to json string
FString OutputString;
TSharedRef<TJsonWriter<>> Writer = TJsonWriterFactory<>::Create(&OutputString);
Expand Down

0 comments on commit acbad67

Please sign in to comment.