小编Han*_*nes的帖子

Angular 2:EXCEPTION:响应状态:URL为0:null

我正在尝试使用我的Angular2/ionic2应用程序发送HTTP GET请求http.get.HTTP GET请求包含有效的Linkedin访问令牌,并且应该返回一些profiledata.但是,getProfileData()调用时会发生以下错误:

3     229881   group    EXCEPTION: Response with status: 0  for URL: null
4     229895   error    EXCEPTION: Response with status: 0  for URL: null
5     229909   groupEnd
6     229950   error    Uncaught Response with status: 0  for URL: null, http://192.168.178.49:8100/build/js/app.bundle.js, Line: 95774
Run Code Online (Sandbox Code Playgroud)

仍然:

  • 在www.hurl.it上测试时,具有相同URL的GET请求有效
  • 从应用程序调用的GET请求使用不同的URL,例如 let URL = "https://httpbin.org/get?name=hannes"

入职-load.ts:

import { Component } from '@angular/core';
import { NavController, Platform, Alert } from 'ionic-angular';
import { OnboardingHelloPage } from '../onboarding-hello/onboarding-hello';
import { CordovaOauth, LinkedIn } from …
Run Code Online (Sandbox Code Playgroud)

linkedin ionic2 angular

17
推荐指数
1
解决办法
2万
查看次数

标签 统计

angular ×1

ionic2 ×1

linkedin ×1