如何在Alamofire中使用此类参数上传图片
retrieveConts(p1,p2?): Observable<IContracts> {
this.basePath = "/myConts";
let params = {argument1: p1};
if (p2)
params = {argument1: p1, argument2: p2};
return http.get(this.basePath, {
params: params,
withCredentials: false
})
.catch(this._errorHandler);
}
如果您认为这不是关于如何处理每个项目的图片上传的最佳做法。请启发我。
答案 0 :(得分:0)
尝试这样
>>> item = 4
>>> x = [1,2,3]
>>> x += list(4)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'int' object is not iterable