zhuravljov / yii2-rest
Yii2 REST 客户端
1.0.3
2016-08-12 21:55 UTC
Requires
This package is auto-updated.
Last update: 2024-09-19 02:16:10 UTC
README
这是什么?
安装
安装此扩展的首选方式是通过 composer.
添加
"zhuravljov/yii2-rest": "*",
"yiisoft/yii2-httpclient": "@dev"
到您的 composer.json
文件的 require 部分中。
使用方法
扩展安装完成后,只需按以下方式修改您的应用程序配置
return [ 'bootstrap' => ['rest-client'], 'modules' => [ 'rest-client' => [ 'class' => 'zhuravljov\yii\rest\Module', 'name' => 'My Rest Client', 'baseUrl' => 'http://localhost/api/v1', ], ], ];
您可以通过以下 URL 访问 Rest Client
http://localhost/path/to/index.php?r=rest-client
或者如果您已启用美观的 URL,您可以使用以下 URL
http://localhost/path/to/index.php/rest-client