[PATCH] Adding TResponse.JSONContent to httpdefs
Original Reporter info from Mantis: MarcusF
-
Reporter name: Marcus Fernstrom
Original Reporter info from Mantis: MarcusF
- Reporter name: Marcus Fernstrom
Description:
Added ability to use TJSONData in content, also sets ContentType.
Example:
procedure jsonEndpoint(aRequest : TRequest; aResponse : TResponse);
var
jObject : TJSONObject;
begin
jObject := TJSONObject.Create;
try
jObject.Booleans['success'] := true;
aResponse.JSONContent := jObject ;
aResponse.SendContent;
finally
jObject.Free;
end;
end;
Mantis conversion info:
- Mantis ID: 38435