POST api/User/login
Request Information
URI Parameters
None.
Body Parameters
loginPostName | Description | Type | Additional information |
---|---|---|---|
username | string |
None. |
|
password | string |
None. |
Request Formats
application/json, text/json
Sample:
{ "username": "sample string 1", "password": "sample string 2" }
application/xml, text/xml
Sample:
<loginPost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ALINPU.Controllers"> <password>sample string 2</password> <username>sample string 1</username> </loginPost>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
loginResultName | Description | Type | Additional information |
---|---|---|---|
token | string |
None. |
|
mobile | string |
None. |
|
code |
状态码,200成功,300错误,400缺少参数,500没有权限,301数据不存在... |
integer |
None. |
msg |
成功或者错误的说明,例如:登录成功,token过期... |
string |
None. |
Response Formats
application/json, text/json
Sample:
{ "token": "sample string 1", "mobile": "sample string 2", "code": 3, "msg": "sample string 4" }
application/xml, text/xml
Sample:
<loginResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ALINPU.Controllers"> <code xmlns="http://schemas.datacontract.org/2004/07/ALINPU.Models">3</code> <msg xmlns="http://schemas.datacontract.org/2004/07/ALINPU.Models">sample string 4</msg> <mobile>sample string 2</mobile> <token>sample string 1</token> </loginResult>