How to retry blocked requests
  • 09 Nov 2023
  • Dark
    Light

How to retry blocked requests

  • Dark
    Light

Article Summary

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);

The automatic interceptor (PXPolicy/requestsInterceptedAutomaticallyEnabled) must be true in order to use this feature.


Was this article helpful?