Rails Not Recognizing JSON as Response Type
It took two days of digging to find it. You need to add an Accept header to the request. Here's how I fixed my problem above:
Map headers = {'Accept': 'application/json'};HttpRequest.request(url, requestHeaders: headers).then(onDataLoaded);