OptionalbodyThe body of the request, as a string.
OptionalcontextOptional context data. Passed through with the request; the HTTP command handler attaches it as response.contextData before invoking postProcessFunction. Use for caller-defined context (e.g. row id, request key).
OptionalcredentialsCredentials mode for the request (e.g., 'include' or 'same-origin').
OptionalforceOptionalheadersHeaders to include in the request.
OptionalmaxOptionalmethodThe HTTP method to use for the request (e.g., GET, POST).
OptionalpostOptional post-processing function. This option is not used by HsFetch; it is passed through in the request options and consumed by the HTTP command handler (e.g. HttpCommands), which invokes it with the response after the request completes.
When used with the HTTP handler: the function must be an exported function (not inline or anonymous), as AsyncFunctionPointer is serialized by name for platforms like Roku/BrightScript. Signature: (response: IHsFetchResponse). When contextData is provided, the handler sets response.contextData before calling the function.
OptionalretainWhether to retain the response body on error.
Options for configuring an
HsFetchrequest.