| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Web.Spock.Api.Client.Browser
Description
Browser Fetch transport for GHC's JavaScript backend. Same-origin cookies are the default. Supply CSRF headers explicitly for unsafe cookie-authenticated endpoints. Cross-origin calls require the server's CORS policy and, for cross-origin cookies, IncludeCredentials. Redirects are rejected.
Synopsis
- browserClient :: ClientConfig -> Either ClientError Client
Documentation
browserClient :: ClientConfig -> Either ClientError Client Source #
Create a client with an AbortController timeout and a streaming response limit. Network failures, timeout, response size, HTTP status and JSON errors are distinct ClientError values. No response data or credentials are logged.