createResource does not working with json()
Why does text() work but json() does not:
I am sure the content I get back is valid JSON and changing the content type has no effect.
I can't think of a reason why this difference in behaviour?
2 Replies
Indeed, I don't see a reason for a difference of behavior. Both options should work.
When I try it, both work:
https://playground.solidjs.com/anonymous/1ae43cce-3875-41b5-9eb7-cd4eda05ad07
It obviously isn't the same for you. It would be helpful to describe more precisely what doesn't work.
Can you check the request in the network tab?