Closed kamillumiehr closed 2 years ago
Yeah, this is a known issue, the http lib does not have electron support but I do have some plans moving forward
I have faced this issue as well. My temporary appoach until it is solved is defining a class of helper methods (get, post etc) selecting axios if platform is PWA or electron, otherwise using the http plugin.
Looks like there may be a fix in http coming at some point
My application is using restful APIs therefore GET/POST/PUT/DELETE are the common operations. I m using HttpClient of angular/common/http. The application is working fine on web platform without any issue but when I run on electron client I am get an error message "Message: Http failure response for https://myapi"
I also tried the @capacitor-community/http but again it is not working and I m getting the following error
TypeError: Failed to fetch at zone.js:1523 at proto. (zone.js:1015)
at request.js:98
at Generator.next ()
at asyncGeneratorStep (asyncToGenerator.js:3)
at _next (asyncToGenerator.js:25)
at asyncToGenerator.js:32
at new ZoneAwarePromise (zone.js:1340)
at asyncToGenerator.js:21
at request (request.js:94)
I also tried to use electron remote but it is also null.