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
"In the successful case, this API method will return a 302 redirect to the icon file - the actual body of the response will point to the resource in question"
That means, that if we will follow the 302 redirect, than we will recieve the actual icon data, in other case - we should get the object with the location field, which points to the requested resource.
Currently, if we pass the followRedirect: false to API call, than we get the response in err parameter of callback, wrapped into Error object. So, considering the next example:
Hi everybody,
To describe this issue let's start from official Read API docs: https://build.phonegap.com/docs/read_api
For example the GET https://build.phonegap.com/api/v1/apps/:id/icon method contains the description of two different behaviors:
"In the successful case, this API method will return a 302 redirect to the icon file - the actual body of the response will point to the resource in question"
That means, that if we will follow the 302 redirect, than we will recieve the actual icon data, in other case - we should get the object with the location field, which points to the requested resource.
Currently, if we pass the
followRedirect: false
to API call, than we get the response in err parameter of callback, wrapped into Error object. So, considering the next example:... we will get the
undefined
data param, and [Error: "{location: "..."}"] in error param.Link to the root of issue: https://github.com/phonegap/node-phonegap-build-api/blob/master/lib/api.js#L208
Regards
The text was updated successfully, but these errors were encountered: