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