Hi all, Im trying to build ui in kotlin/js, at this moment strugling with sign up component. Im tryi...
b
Hi all, Im trying to build ui in kotlin/js, at this moment strugling with sign up component. Im trying to use fetch() to post login&password to my API.
Copy code
val post = window
.fetch(URL, RequestInit("post",HEADER,"{$bodyVar})
But its ending with error:
Failed to execude 'fetch' {...} Failed to read 'headers' from RequestInit
Already i try few types of typing header but all ends with same result. How fetch function should looks? How i can but header to IT? I want to put Content-Type and Authorization
b
Thank for fast reply, Your solution is pretty complex and im not sure did i understand it correctly. Going to test :)
Seems that is working now 😇