我有一个base64字符串图像,我必须用其他参数调用api
我的api是:
register(data,userImg) {
let opt: RequestOptions;
opt = new RequestOptions({
})
return new Promise((resolve, reject) => {
this.http.get(apiUrl+'register/0/register?email='+data.email+'&password='+data.password+'&name='+data.name+'&userImg='+userImg, opt)
.map(res => res.json())
.subscribe(data => {
this.data = data;
resolve(this.data);
},(err) => {
reject(err);
});
});
}
userImg是base64字符串图像,但是当我调用它时,它会直接转到错误,有人知道如何使它工作吗?感谢〜