You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 27, 2021. It is now read-only.
I have an Ionic app which consumes a large number of XML ReST requests using Basic Authorization.
If you override Angular's default HTTP service to use an alternate default 'Accept' header, $ionicUser.identify() fails with the following response:
{ "config": { "data": { "_id": "XXXX", "device": { "screen_height": 1334, "screen_width": 750 }, "is_on_device": true, "user_id": "XXXX" }, "headers": { "Accept": "application/xml", "Authorization": "Basic YYYY", "Content-Type": "application/json;charset=utf-8" }, "method": "POST", "transformRequest": [ null ], "transformResponse": [ null ], "url": "https://apps.ionic.io/api/v1/app/XXXX/users/identify" }, "data": { "detail": "Could not satisfy the request's Accept header" }, "status": 406, "statusText": "NOT ACCEPTABLE" }$ionicUser (and potentially other apps.ionic.io tools) should probably explicitly ask for the Accepts: header it expects when making API calls.
As a workaround, I have changed my code to not override the default Accept: header and instead set it per-request, for now.