haxe.Http redirect behavior across targets
0 reputation · 14 Apr 2025, 09:46 UTC
Target-Dependent Redirect Handling
The haxe.Http class provides a unified interface for performing HTTP requests across multiple targets. When making requests without authentication credentials, the library's behavior regarding HTTP 3xx redirect status codes appears to vary based on the compilation target.
In Haxe 4.3, the JavaScript and Neko targets typically follow redirects automatically. However, targets such as C++ and PHP may leave the redirect unprocessed, returning the 3xx status code directly to the application without following the Location header.
This inconsistency creates uncertainty when designing cross-platform integration tests that rely on unauthenticated endpoints that redirect to a landing page.
- Does
haxe.Httpprovide a target-agnostic configuration to force or disable automatic redirect following? - What is the recommended approach to ensure consistent redirect behavior across JavaScript, Neko, and C++ targets?