Public
Documentation Settings

demo-chatroom

POST注册

localhost:8888/v1/user
HEADERS
Content-Type

application/json

Bodyraw
{
	"username":"zy02",
	"passwd":"abc123",
	"gender":1,
	"age":20,
	"interest":"300"
}
Example Request
curl
curl --location 'localhost:8888/v1/user' \
--header 'Content-Type: application/json' \
--data '{
	"username":"zy02",
	"passwd":"abc123",
	"gender":1,
	"age":20,
	"interest":"300"
}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

POST获取登录token

localhost:8888/v1/login

login

HEADERS
Content-Type

application/json

Bodyraw
{
	"username":"JabinGP",
	"passwd":"abc123"
}
Example Request
curl
curl --location 'localhost:8888/v1/login' \
--header 'Content-Type: application/json' \
--data '{
	"username":"JabinGP",
	"passwd":"abc123"
}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

GET查找用户

localhost:8888/v1/user?username=
HEADERS
Authorization

Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NzU0MzA5NjIsImlhdCI6MTU3NTQyOTc2MiwiaXNzIjoiaXJpcyIsInVzZXJJZCI6MSwidXNlck5hbWUiOiJhZG1pbiJ9.PjD8M-owIhFHKP40XqHw4Z6S-WdWzgQbxQcYqEFjz-8

PARAMS
username
Example Request
curl
curl --location 'localhost:8888/v1/user?username=' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NzU0MzA5NjIsImlhdCI6MTU3NTQyOTc2MiwiaXNzIjoiaXJpcyIsInVzZXJJZCI6MSwidXNlck5hbWUiOiJhZG1pbiJ9.PjD8M-owIhFHKP40XqHw4Z6S-WdWzgQbxQcYqEFjz-8'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

PUT用户自己修改信息

localhost:8888/v1/user
HEADERS
Content-Type

application/json

Authorization

Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NzcxODA2NDYsImlhdCI6MTU3NzE3OTQ0NiwiaXNzIjoiaXJpcyIsInVzZXJJZCI6MSwidXNlck5hbWUiOiJKYWJpbkdQIn0.U17VAqUsf1wh22lvbR5-vwY0HJLdegIPFYH9xNXPS7Q

Bodyraw
{
	"gender":2,
	"interest":"singing, jump, rap",
	"age":21
}
Example Request
curl
curl --location --request PUT 'localhost:8888/v1/user' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NzcxODA2NDYsImlhdCI6MTU3NzE3OTQ0NiwiaXNzIjoiaXJpcyIsInVzZXJJZCI6MSwidXNlck5hbWUiOiJKYWJpbkdQIn0.U17VAqUsf1wh22lvbR5-vwY0HJLdegIPFYH9xNXPS7Q' \
--data '{
	"gender":2,
	"interest":"singing, jump, rap",
	"age":21
}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers