| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
10年前发布

Yii2 REST客户端

Yii2 REST客户端

Screen

Installation

The preferred way to install this extension is through composer.

Add

"zhuravljov/yii2-rest": "*",  "yiisoft/yii2-httpclient": "@dev"

to the require section of yourcomposer.jsonfile.

Usage

Once the extension is installed, simply modify your application configuration as follows:

return [      'bootstrap' => ['rest-client'],      'modules' => [          'rest-client' => [              'class' => 'zhuravljov\yii\rest\Module',              'baseUrl => 'http://localhost/api/v1',          ],      ],  ];

You can then access Rest Client through the following URL:

http://localhost/path/to/index.php?r=rest-client

or if you have enabled pretty URLs, you may use the following URL:

http://localhost/path/to/index.php/rest-client

项目主页:http://www.open-open.com/lib/view/home/1441635793649

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1441635793649.html
Yii2 Web框架