我在IONIC中有一个应用程序,并且在浏览器中可以调用API,但是当我在android设备上运行时会显示此错误:
HttpErrorResponse {headers: HttpHeaders,status: 0,statusText: "Unknown Error",url: "http://192.168.1.***:8080/api/auth/login",ok: false,…}
error: ProgressEvent {isTrusted: true,lengthComputable: false,loaded: 0,total: 0,type: "error",…}
headers: HttpHeaders {normalizedNames: Map(0),lazyUpdate: null,headers: Map(0)}
message: "Http failure response for http://192.168.1.***:8080/api/auth/login: 0 Unknown Error"
name: "HttpErrorResponse"
ok: false
status: 0
statusText: "Unknown Error"
url: "http://192.168.1.***:8080/api/auth/login"
__proto__: HttpResponseBase
在IONIC中,我发送API_URL = 'http://192.168.1.***:8080/api/';
来使用HttpClient,而在Laravel中,我运行php artisan serve --host 192.168.1.*** --port 8080
请,有人知道我该怎么做?