Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodTsmCustomHTTPSClient.Execute

function Execute(const aMethod, aURL: string; const aHeaders: tHttpHeaders; const aBody: TBytes): tHttpResponse;
BeginRequest, then wait for the head and read the whole body. The caller owns the returned response and must free it. An HTTP error status is NOT an exception - a 404 or a 500 arrives as an ordinary response with that StatusCode. What DOES raise is a transport, TLS, framing or policy failure, a body that timed out or was cut short, and a redirect chain longer than MaxRedirects. Redirects are followed per RedirectPolicy - read it before relying on that, because which methods are followed, what happens to the body, and what is stripped across an origin boundary are all decisions it documents. A 3xx that policy does not follow is returned exactly as it arrived, and Response.FinalURL is the URL the answer actually came from.