Tagged: contentNegotiator

在 Postman 中,GET http://api.github-shuijingwan-yii2-app-advanced.localhost/v1/logs?filter[level]=4&filter[category][like]=api\behaviors\RequestLogBehavior&filter[prefix][like]=app-api&filter[log_time][gte]=1528090828&filter[log_time][lte]=1529564924.6648 ,200响应,空数组已经被自动转换为空对象,以保证字段格式的统一,GET http://api.github-shuijingwan-yii2-app-advanced.localhost/v1/logs/3 0

Based on yiisoft/yii2-app-advanced, create a new repository yii2-app-advanced on github, and create a new interface application (implement RESTful-style web service services. API), adjust the default character set to: utf8mb4, the adjustment of the interface response format, the empty array is automatically converted to empty objects, and the request log message is collected in the interface application (1 request corresponds to 1 log message) to the database, and the corresponding interface to implement the log function: log list (set data filter to enable filter processing), log details

浏览量: 15 1. Set the default collation of the database as: utf8mb4_unicode_ci, as shown in Figure 1 2. Modify the default character set for database connections: utf8mb4, edit the configuration file in the development...

运行测试,获取详细的输出,可看到一步一步的行为报告,符合预期 0

Based on yiisoft/yii2-app-advanced, create a new repository yii2-app-advanced on github, and create a new interface application (implement RESTful-style web service services. API), prepare some examples of automated tests (API tests) for user-related operations in the tests directory of the API to ensure that the application will not affect existing functions when changing or adding new functions

浏览量: 57 1. Delete the controller \API\Controllers\SiteController.php, delete the model \api\models\contactform.php, \api\models\loginform.php, \api\models\PasswordResetRequ estform.php, \api\models\resetpasswordform.php, \api\models\signupform.php, delete the directory (view related) \api\views, \api\assets, \api\web\css 2. Delete the relevant files of the test (unit test,...

在 Postman 中,GET http://api.github-shuijingwan-yii2-app-advanced.localhost/v1/users ,200响应,message为简体中文 0

Based on yiisoft/yii2-app-advanced, create a new repository yii2-app-advanced on github, and create a new interface application (implement RESTful-style web service services. API), implement RESTful web service, support internationalization (drivingly set the target language, default to simplified Chinese)

浏览量: 51 1. RESTful web service, it is recommended to implement based on a separate interface application, at this time, it is implemented based on the API application 2. Create a new directory: \api\rests,...