Robert Jaros
03/05/2024, 8:18 AMorg.w3c.fetch.RequestInit()
defined in stdlib like this:
https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/wasm/js/src/org.w3c/org.w3c.fetch.kt#L107
But as undefined
is null
on Wasm, the generated object contains nulls and the browser doesn't like it:
Exception: TypeError: Window.fetch: 'null' (value of 'cache' member of RequestInit) is not a valid value for enumeration RequestCache.