We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 915da47 commit 8d0ef7eCopy full SHA for 8d0ef7e
Quick.HttpClient.pas
@@ -380,7 +380,9 @@ constructor THttpRequestResponse.Create(aResponse: IHTTPResponse; const aContent
380
begin
381
fStatusCode := aResponse.StatusCode;
382
fStatusText := aResponse.StatusText;
383
- if aContent <> '' then fResponse := TJSONObject.ParseJSONValue(aContent) as TJSONObject;
+ if ((aContent <> '') and
384
+ (aContent.StartsWith('{') or (aContent.StartsWith('[')))
385
+ ) then fResponse := TJSONObject.ParseJSONValue(aContent) as TJSONObject;
386
//if response is not json, get as json result
387
if fResponse = nil then
388
0 commit comments