简体   繁体   中英

Delphi Rest Callback Loginprompt

I have a callback in my application but when it gets a message it shows a login prompt for my REST Server.

Code:

FManager := TDSRestClientChannel.Create('ID', ChannelName,     DSRestConnection1);

  LCallback := TDSRestClientCallback.Create(Self.FManager, 'AnyName',
    function(AValue: TJSONValue; ADataType: string): Boolean
    begin
      TCallBackFunctions.QueueMessage(AValue.ToString);
      Result := true;
    end
  );
  FManager.RegisterCallback(LCallback);

I can't find anywhere with a LoginPrompt boolean or any method that calls for a login prompt.

Anyone has any idea on how to do that?

When your program displays the login prompt, pause your program in Delphi's debugger. Look at the call-stack window, and it will show exactly which functions were called to get you to that login dialog. Inspect the source code from there to determine how to avoid the dialog.

在组件DSRestConnection1中,有一个属性LoginPrompt。

DSRestConnection1.LoginPrompt:= False;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM