Closed konomae closed 4 months ago
urql accepts HeadersInit (via RequestInit), it appears that a Headers object can be passed. But when I actually do, it causes errors.
HeadersInit
RequestInit
Headers
const headers = new Headers(); const client = new Client({ url: "https://localhost:3000/graphql", exchanges: [fetchExchange], fetchOptions: { headers }, }); const response = await client.query("{ ping }", {});
[Network] Headers.append: "append(name, value) { /* omit */ }" is an invalid header value.
I think: 🤔
https://github.com/konomae/urql-headers-repro
urql 4.2.3 node 20.11
Describe the bug
urql accepts
HeadersInit
(viaRequestInit
), it appears that aHeaders
object can be passed. But when I actually do, it causes errors.I think: 🤔
Reproduction
https://github.com/konomae/urql-headers-repro
Urql version
urql 4.2.3 node 20.11
Validations