HSBot Defender
Functions
This function checks if the SDK can handle the URL request's response and presents the block screen. Returns true
if the Human's payload in the response can be handled by the SDK. This function does not present the block screen. You must call the start(appId:delegate:completion:) function and wait until it's done before calling this function
Returns the challenge's Reference ID. This value will appear in the challenge screen. The value is unique per app run. Meaning, for each challenge in the app run the value will be the same for all challenges. Note that the value in the challenge screen will be different from the returned value when:
Returns a JSON string that represent the given error type. When the automatic interceptor is enabled, the body of the URL response will be the same as the string that returns here. When the automatic interceptor is disabled, you may replace the original URL response with the string that returns here.
Returns the relevant `HSBotDefenderErrorType`
of the given error. When policy type is set to PXPolicyUrlRequestInterceptionType/INTERCEPT
you can use this function to know if the request was blocked. When policy type is set to PXPolicyUrlRequestInterceptionType/INTERCEPT_WITH_DELAY
you can use this function with the response to know if the request was solved or cancelled. If the error is not related, this function will return `HSBotDefenderErrorType/unknown`
.
This function handles the URL request's response and presents the block screen, if necessary. Returns true
if the Human's payload in the response was handled by the SDK. This function should be used only when the `PXPolicyUrlRequestInterceptionType`
is set to `PXPolicyUrlRequestInterceptionType/NONE`
in the policy.
Returns HTTP headers that should be added to the URL request. This function should be used only when the `PXPolicy/urlRequestInterceptionType`
is set to `PXPolicyUrlRequestInterceptionType/NONE`
.
Set custom parameters for given AppID.