An open API service indexing awesome lists of open source software.

https://github.com/jader/thinkphp-test

thinkphp api test
https://github.com/jader/thinkphp-test

Last synced: about 1 year ago
JSON representation

thinkphp api test

Awesome Lists containing this project

README

          

## 简易版 thinkphp api 测试

### 目录结构

```
project_root/
|-- app/
| |-- controller/
| | |-- Login.php
| |-- middleware/
| | |-- AuthMiddleware.php
| |-- service/
| | |-- UserService.php
| |-- model/
| | |-- User.php
| |-- dao/
| | |-- UserDao.php
|-- config/
| |-- auth.php
|-- route/
| |-- app.php
|-- composer.json

```

### 测试登录API

```sh
curl -X POST http://your_domain.com/user/login -d "username=your_username&password=your_password"
```

### 测试业务API

```sh
curl -X GET http://your_domain.combusiness/user/userinfo -H "Authorization: Bearer your_jwt_token"
```