【发布时间】:2017-07-15 06:52:08
【问题描述】:
当我尝试通过 ip 连接到我的服务器时,它在我的控制台中显示一个错误,但是当我通过邮递员尝试时它起作用了。谁能帮助我。谢谢。
我的错误,
core.umd.js:3066 ORIGINAL EXCEPTION: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL
我的代码,
onSubmit(form:any){
var headers = new Headers();
headers.append('Content-Type', 'application/json');
this.http.post('193.568.0.14:5000/api/signup', form.value, { headers: headers}).subscribe(
response => {
if(response.json().error_code == 0){
}
})
}
【问题讨论】: