My goal is to send a request to /api/sessions
using Restangular. Here's how I have set up my code:
var data = { "email": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="dbaea8bea99bbeb6bab2b7f5b8b4b6">[email protected]</a>", password: "userpass" }
Restangular.all('/api/sessions').post(data, params, {'Content-Type': 'application/json'});
Despite this configuration, the POST request is being sent without the JSON body.