Such code `js("{'Content-Type':'application/json'}...
# javascript
u
Such code
js("{'Content-Type':'application/json'}")
Produce:
{Content-Type: 'application/json'}
Content-Type
without quotes is not valid js code. Produce error
Unexpected token
Is it compiler bug or I miss something?
r
Seems like a bug, could you please file an issue in https://youtrack.jetbrains.com/issues/KT. As workaround may suggest
Copy code
val o = js("{}")
o["Content-Type"] = "application/json"
u
@Roman Artemev [JB] thanks for workaround https://youtrack.jetbrains.com/issue/KT-32285
🙏 2