Qt5 parameterized server (#8183)

* first Commit parameterzied Server support

* fixed serverconfig classes

* Defautl constructor f. Config, fixed regex replace

* Polosihed Templates, Added MultiServer support

* Update Readme. Fixed MultiServer. Fixed def. Value

* Passing global Server to mustache. Small fixes

* Updated  samples, fixed mustache for multi server

* added prefixes, removed unused imports

* added newly generated samples

* missing vendorExtension in mustache. Update smaple

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
basyskom-dege
2020-12-19 04:34:12 +01:00
committed by GitHub
parent 0be3fe6104
commit febd65d3b8
34 changed files with 1002 additions and 233 deletions

View File

@@ -65,7 +65,11 @@ void OpenAPIPetApi::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.StartsWith(TEXT("application/json")) || ContentType.StartsWith("text/json"))
{
Content = HttpResponse->GetContentAsString();
@@ -78,7 +82,7 @@ void OpenAPIPetApi::HandleResponse(FHttpResponsePtr HttpResponse, bool bSucceede
return; // Successfully parsed
}
}
else if(ContentType == TEXT("text/plain"))
else if(ContentType.StartsWith(TEXT("text/plain")))
{
Content = HttpResponse->GetContentAsString();
InOutResponse.SetResponseString(Content);