Skip to content
Zed edited this page Mar 31, 2020 · 2 revisions

User

Create User

Endpoint: POST - http://localhost:8080/api/v1/users

Description: N/A

Header

{
	Content-Type: application/json; charset=utf-8
}

Body

{
	"username": "zed2",
	"password": "01db71ab8048f74a4b92c26ba77285ade0687ac192758e8185ad52701f649ef2",
	"switchFriendCode": "SW-1234-1234-1234",
	"nickname": "张豆",
	"jikeId": "张豆"
}

Response

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
Date: Tue, 31 Mar 2020 08:30:45 GMT
Content-Length: 19
Connection: close

{"username":"zed2"}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Date: Tue, 31 Mar 2020 15:11:58 GMT
Content-Length: 44
Connection: close

{"code":-4,"msg":"用户名已被使用!"}

Me

Endpoint: GET - http://localhost:8080/api/v1/me

Description: N/A

Header

{
	Authorization: Bearer 
}

Body


Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Tue, 31 Mar 2020 14:59:18 GMT
Content-Length: 128
Connection: close

{"id":"5e82ffb52fc4557c9d343b46","username":"zed2","nickname":"张豆","switchFriendCode":"SW-1234-1234-1234","jikeId":"张豆"}
Clone this wiki locally