The problem is that you need to do await res.json() as well, but otherwise your approach works. I think the await fetch().then(res => res.json()) pattern is common enough that it's worth mentioning.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The problem is that you need to do
await res.json()
as well, but otherwise your approach works. I think theawait fetch().then(res => res.json())
pattern is common enough that it's worth mentioning.