Discuss this help topic in SecureBlackbox Forum

TElHTTPSClient.OnRedirection

TElHTTPSClient     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


This event is fired when HTTP redirection is to be performed.

Declaration

[C#]
    event TSBHTTPRedirectionEvent OnRedirection;
    delegate void TSBHTTPRedirectionEvent(Object Sender, string OldURL, ref string NewURL, ref bool AllowRedirection);

[VB.NET]
    Event OnRedirection As TSBHTTPRedirectionEvent
    Delegate Sub TSBHTTPRedirectionEvent(ByVal Sender As Object, ByVal OldURL As String, ByRef NewURL As String, ByRef AllowRedirection As Boolean)

[Pascal]
    property OnRedirection : TSBHTTPRedirectionEvent;
    TSBHTTPRedirectionEvent = procedure(Sender : TObject; const OldURL : string; var NewURL : string; var AllowRedirection : boolean) of object;

[C++]
    void get_OnRedirection(TSBHTTPRedirectionEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnRedirection(TSBHTTPRedirectionEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TSBHTTPRedirectionEvent)(void * _ObjectData, TObjectHandle Sender, const char * pcOldURL, int32_t szOldURL, char * pcNewURL, int32_t &szNewURL, int8_t &AllowRedirection);

[PHP]
    TSBHTTPRedirectionEvent|callable|NULL get_OnRedirection()
    void set_OnRedirection(TSBHTTPRedirectionEvent|callable|NULL $Value)
    callable TSBHTTPRedirectionEvent(TObject $Sender, string $OldURL, string &$NewURL, bool &$AllowRedirection)

[Java]
    TSBHTTPRedirectionEvent getOnRedirection();
    void setOnRedirection(TSBHTTPRedirectionEvent Value);
    TSBHTTPRedirectionEvent.Callback OnRedirection = new TSBHTTPRedirectionEvent.Callback() {
        public void TSBHTTPRedirectionEventCallback(TObject Sender, String OldURL, TSBString NewURL, TSBBoolean AllowRedirection) {
            //...
        }
    }

Parameters

  • OldURL - redirection source
  • NewURL - redirection destination which may be set by user
  • AllowRedirection - specifies if redirection should be allowed
  • pcOldURL - redirection source
  • szOldURL - the length of pcOldURL.
  • pcNewURL - redirection destination which may be set by user
  • szNewURL - the length of pcNewURL.

Description

    This event is fired when redirection response is received from server. In Java, the function result is string, which must be non-empty to allow redirection. Typically, it contains the value of the NewURL parameter.

Discuss this help topic in SecureBlackbox Forum