js: data is sent as the body in JSON format