POST api/User/EditUserHeaderImg?tokenstr={tokenstr}

上传头像接口,(建议使用下面一个统一接口)

Request Information

URI Parameters

NameDescriptionTypeAdditional information
tokenstr

tokenstr:id、tel、token的拼接,如:2+"|"+111+"|"+111

string

Required

Body Parameters

None.

Response Information

Resource Description

uploadImgResult
NameDescriptionTypeAdditional information
imgUrl

string

None.

imgId

integer

None.

code

状态码,200成功,300错误,400缺少参数,500没有权限,301数据不存在...

integer

None.

msg

成功或者错误的说明,例如:登录成功,token过期...

string

None.

Response Formats

application/json, text/json

Sample:
{
  "imgUrl": "sample string 1",
  "imgId": 1,
  "code": 2,
  "msg": "sample string 3"
}

application/xml, text/xml

Sample:
<uploadImgResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebApi.Controllers">
  <code xmlns="http://schemas.datacontract.org/2004/07/WebApi.Models">2</code>
  <msg xmlns="http://schemas.datacontract.org/2004/07/WebApi.Models">sample string 3</msg>
  <imgId>1</imgId>
  <imgUrl>sample string 1</imgUrl>
</uploadImgResult>