HTTP request not working in iOS sim

In my own app I found out that it is not possible to run http requests in the iOS simulator. I have tried this with the angular httpclient and with a http plugin. Both both did not give a response.

I have created a test application where It is possible to reproduce the problem. In the app you can fill in a test url and trigger the requests by click on the button.

Ionic info


   Ionic CLI                     : 6.13.1 (/Users/martijn/.nvm/versions/node/v12.19.1/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.6.0
   @angular-devkit/build-angular : 0.1101.4
   @angular-devkit/schematics    : 11.1.4
   @angular/cli                  : 11.1.4
   @ionic/angular-toolkit        : 3.1.0


   Capacitor CLI   : 3.0.0-beta.6
   @capacitor/core : 3.0.0-beta.6


   cordova-res : not installed
   native-run  : 1.3.0


   NodeJS : v12.19.1 (/Users/martijn/.nvm/versions/node/v12.19.1/bin/node)
   npm    : 6.14.8
   OS     : macOS Big Sur

WKWebView enforces CORS, so you have to configure your server to allow access from capacitor://localhost urls.

If I enter this url in your app, it works because it allow CORS.