silkimen / cordova-plugin-advanced-http

Cordova / Phonegap plugin for communicating with HTTP servers. Allows for SSL pinning!
MIT License
400 stars 321 forks source link

[Feature] web worker support #445

Closed CodeWithOz closed 2 years ago

CodeWithOz commented 3 years ago

Is your feature request related to a problem? Please describe. I have network requests that are currently performed in web workers. I'd like to know if there's a way to use this plugin for those requests.

Describe the solution you'd like I'd like a way to use this plugin's API via a web worker.

Describe alternatives you've considered Right now the alternative is to perform the requests from the main thread using this plugin, then funnel the results into the web worker when the request resolves.

silkimen commented 2 years ago

Hi @CodeWithOz, unfortunately this plugin can't be used directly in a web worker. The reason is that the cordova bridge is not available in the web worker (e.g. check this link). But I'd love to implement this feature if the cordova team decided to support web workers. Maybe you can open an issue there?

silkimen commented 2 years ago

Closing this, feel free to open a new issue, if this won't solve your problem! 👍