User:RominaU/Response
Contents
The Response
Use the Response page to read the returned data from the service through the TRESTResponse class.
Item | Description |
---|---|
lbl_LastRequestURL TLabel |
Displays the BaseURL property of TRESTClient. |
lbl_LastRequestStats TLabel |
Contains information about:
|
lbl_ProxyState TLabel |
Specifies if the Proxy-server is enabled or not. |
Headers
The response header contains pairs of (key=value) and has information such as date, size and type of file that the server sends to the client and also data about the server itself.
The HTTP header fields retrieved by the server differ from an API to another.
Note: For more information about header fields, see this link.
Item | Description |
---|---|
memo_ResponseHeader TMemo |
Displays the Headers property of TRESTResponse. |
Body
The response holds all the returned data from the service. The data includes the HTTP status code, error messages (if these exist) and the returned JSON data.
The response data can be accessed using one of the properties: Content, JSONValue or RAWbytes.
Item | Description |
---|---|
LabelJSON TLabel |
Specifies if:
|
JSON Root Element |
Represents the RootElement property of TRESTResponse. Insert the wanted root element into EditRootElement TClearingEdit. |
memo_ResponseBody TMemo |
Displays all the returned data from the service, situated right after the header. |
Apply button |
Limits the contents of the response body shown, based on RootElement property. |
Tabular Data
A JSON formed response of a service can be transformed into any TDataSet-descendant class with a dataset adapter.
Each JSON object will be a new record in the dataset. The properties of the JSON object(s) will typically form the columns of the dataset.
Item | Description |
---|---|
StringGrid1 TStringGrid |
Shows the response organized as a dataset. |