Passing in json does not work here. 'data' needs to be a string. I agree JSON.stringify is better. When I looked it up, I thought it needs extra library. Turns out it does not.