Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxRestServiceResponse.IsSuccess Property

Identifies if the current query to a REST server is successful.

#Declaration

Delphi
property IsSuccess: Boolean read;

#Property Value

Type Description
Boolean

True if the current query to a REST server is successful; otherwise, False.

#Remarks

You can use the StatusCode property to obtain the status code associated with the current server response.

#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;  // This unit 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;
See Also