Skip to main content

TdxRestServiceResponse Class

The base class for REST service response information containers.

Declaration

TdxRestServiceResponse = class(
    TObject
)

Remarks

Main API Members

The list below outlines key members of the TdxRestServiceResponse class. These members allow you to identify the server response status.

IsSuccess
Identifies if the query is successful.
StatusCode
Returns the REST service response status code.

Code Example: Validate Server Response

The code example in this topic section demonstrates a function that checks if an Azure Maps server response is valid. The function returns False and displays a message box with the corresponding error message if a server query fails.

uses
  dxMessageDialog;  // Declares the dxMessageDlg global function
// ...

function TMyForm.ValidateServerResponse(AResponse: TdxAzureMapResponse): Boolean;
begin
  if AResponse <> nil then
  begin
    Result := AResponse.IsSuccess;
    if not Result and Assigned(AResponse.ErrorInfo) then
      dxMessageDlg(AResponse.ErrorInfo.Message, TMsgDlgType.mtError, [mbOK], 0);
  end
  else
    Result := False;
end;

Terminal TdxRestServiceResponse Class Descendants

Do not use the TdxRestServiceResponse class directly. Use the following descendants instead:

TdxAzureMapGeocodeRequestResponse
TdxAzureMapGeolocationRequestResponse
TdxAzureMapReverseGeocodeRequestResponse
TdxAzureMapRouteRequestResponse

Inheritance

TObject
TdxRestServiceResponse
See Also