文档
测试
POST
http://127.0.0.1/login

接口描述

User Login

请求参数

参数名
类型
必填
email
email type string
必填
password
string
必填

响应参数

参数名
类型
描述
必填
code
int
0 means login success; -1 means error, please see "msg" for more info
必填
msg
string
message from server
必填
data
interface{}
struct of your account if login success; nil if login fail
必填

说明 / 示例

|request|response| |-|-|-| |`curl http://127.0.0.1/login -d "email=123@gmail.com&password=123&nickname=superuser"`|`{"code":0,"msg":"Login Success","data":"123@gmail.com"}`| |`curl http://127.0.0.1/login -d "email=12@gmail.com&password=123&nickname=superuser"`|`{"code":-1,"msg":"no such user"}`| |`curl http://127.0.0.1/login -d "email=123@gmail.com&password=1234&nickname=superuser"`|`{"code":-1,"msg":"wrong password"}`|