Johann Fazakas
01/19/2024, 3:52 PMwindow.fetch
call? I'm new to multiplatform and wasm, I see there's a second init: RequesInit
parameter on the fetch
call, but I'm not sure how should I pass a mapOf<String, String>()
to this object which seems to require some wasm JsAny?
type for headers
.
Of course, any other wasm ways/clients for http clients would also probably help me. window.fetch
was just the only solution I found for this.Robert Jaros
01/19/2024, 4:01 PMRobert Jaros
01/19/2024, 4:02 PMJohann Fazakas
01/19/2024, 4:47 PMval requestInit = obj<RequestInit> {}
requestInit.headers = obj()
requestInit.headers!!["key"] = "value".toJsString()
window.fetch("<http://localhost:8136/account/v1/personal-accounts>", requestInit)
Will continue playing with this next week. Have a great day!