Native HTTP resolving Promise and passing to main thread

We are using Native HTTP as we are using a service that does not support CORS. So we are not getting the required attribute from the service and hence the app is not working on iOS, as WKWebView is flagging it as a CORS issue.

We switched to Cordova Native HTTP, we are able to resolve the response and print it on the console to check, however, since it is happening in a separate thread, not sure how to pass the information to the main angular thread.

Can someone help?

I’m not sure I follow what the issue is. Can you share some code?

There’s at least two potential issues: getting the Promise, and whether what you are getting is actually a Promise. Plugins don’t always return an object that is Promise A+ compliant… If that’s an issue you can use this trick

suupose x = some sketchy Promise<T>
let y = Promise.resolve(x)   // <--- this is of type Promise<T>, and it's Promise A+ compliant.

If the Promise is fine, it’s just a matter of returning the Promise, so yeah, it’s a code question.