gin_demo/test.http
2026-03-27 10:42:46 +08:00

31 lines
716 B
HTTP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### GET /
GET http://localhost:8080/
Accept: application/json
### GET /panic panic nice.Recovery JSON
GET http://localhost:8080/panic
Accept: application/json
### POST /api/auth/register
POST http://localhost:8080/api/auth/register
Content-Type: application/json
{
"username": "alice",
"password": "123456"
}
### POST /api/auth/login -> token
POST http://localhost:8080/api/auth/login
Content-Type: application/json
{
"username": "alice",
"password": "123456"
}
### GET /api/me Authorization: Bearer <token>
GET http://localhost:8080/api/me
Accept: application/json
Authorization: Bearer YOUR_TOKEN_HERE