Question from the Ionic Framework test

What is the output of the following code? const { HttpClient } = require('@ionic/angular'); const http = new HttpClient(); http.get('https://example.com/api/users').subscribe(res => console.log(res));

Expert

Imagine an application that connects to an API. You launch your application on a device with ionic run.

The application makes a request to a server http://api.ionic.com/endpoint that does not allow CORS.

What will happen?

Author: Benjamin CanacStatus: PublishedQuestion passed 113 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!