Ti.Network.createHTTPClient 401 without credentials: retry behavior?
0 reputation · 23 Oct 2022, 01:26 UTC
Symptom: 401 Response on Protected Endpoint
When a Titanium application calls Ti.Network.createHTTPClient to reach a Basic Auth protected API without supplying an Authorization header, the request returns a 401 status code. The SDK’s documentation does not specify whether it attempts a retry or simply fails.
The goal is to determine if the client automatically retries the request after the initial 401 or if it fails immediately, and whether this behavior differs between iOS and Android in the current stable release.
Key constraints: no credentials are provided; the test must be performed in a clean environment without any prior authentication state.
Questions:
- Does
Ti.Network.createHTTPClientautomatically retry a request after receiving a 401 when noAuthorizationheader is present? - Is there any SDK setting or callback that can enable automatic retry for authentication failures?
- Do iOS and Android platforms exhibit the same retry logic for this scenario?