How to retry blocked requests
v2.x
URL Requests that were blocked by HUMAN don't reach your server. Therefore, after the user solves the challenge you may want to retry those requests. At this point the SDK does not provide an option to retry those requests automatically, but there is a way to do this using the "block response with the challenge result". This feature allow you to get the error from your URL request after the user solves the challenge (instead of before solving it). Then, you can retry the URL request immediately. To enable this feature, you should set the PXPolicy/delayResponseUntilChallengeSolvedOrCancelled
to true
in the policy.
policy.delayResponseUntilChallengeSolvedOrCancelled = true
policy.setDelayResponseUntilChallengeSolvedOrCancelled(true);
Note
The automatic interceptor (
PXPolicy/requestsInterceptedAutomaticallyEnabled
) must betrue
in order to use this feature.
Updated 12 days ago