[cpp-ue4] add support for empty response (#7333)

This commit is contained in:
Falanwe
2020-09-04 15:32:29 +02:00
committed by GitHub
parent 2fd23f505e
commit 662c77a283

View File

@@ -56,7 +56,11 @@ void {{classname}}::HandleResponse(FHttpResponsePtr HttpResponse, bool bSucceede
FString ContentType = HttpResponse->GetContentType();
FString Content;
if (ContentType == TEXT("application/json"))
if(ContentType.IsEmpty())
{
return; // Nothing to parse
}
else if (ContentType == TEXT("application/json"))
{
Content = HttpResponse->GetContentAsString();