SecureBlackbox 2020 Qt Edition

Questions / Feedback?

Redirection Event

Fires when the server suggests a redirect.

Syntax

class RESTClientRedirectionEventParams {
public:
  const QString &OldURL();
  const QString &NewURL();
  void SetNewURL(const QString &qsNewURL);
  bool AllowRedirection();
  void SetAllowRedirection(bool bAllowRedirection);
  int EventRetVal();
  void SetEventRetVal(int iRetVal);
};
// To handle, connect one or more slots to this signal. void Redirection(RESTClientRedirectionEventParams *e);
// Or, subclass RESTClient and override this emitter function. virtual int FireRedirection(RESTClientRedirectionEventParams *e) {...}

Remarks

This event is fired when the server suggests a redirection request (typically via a 301 or 302 response). OldURL indicates the 'from' page, and NewURL indicates the 'to' one. The destination page can be altered by the application if needed. Use AllowRedirection to block undesirable redirects.

Generally, this is a notification event: the component handles redirections automatically. Use the MaxRedirections config property to limit the number of redirection hops.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox 2020 Qt Edition - Version 20.0 [Build 8154]