Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhuravljov/yii2-rest
Yii2 REST Client
https://github.com/zhuravljov/yii2-rest
module rest yii2
Last synced: 3 days ago
JSON representation
Yii2 REST Client
- Host: GitHub
- URL: https://github.com/zhuravljov/yii2-rest
- Owner: zhuravljov
- Created: 2015-09-06T20:38:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-07-18T15:08:42.000Z (over 6 years ago)
- Last Synced: 2025-01-01T23:08:53.803Z (10 days ago)
- Topics: module, rest, yii2
- Language: PHP
- Size: 273 KB
- Stars: 118
- Watchers: 21
- Forks: 24
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-yii2 - zhuravljov/yii2-rest
README
Yii2 REST Client
================[![Latest Stable Version](https://poser.pugx.org/zhuravljov/yii2-rest/v/stable.png)](https://packagist.org/packages/zhuravljov/yii2-rest)
[![Build Status](https://travis-ci.org/zhuravljov/yii2-rest.svg)](https://travis-ci.org/zhuravljov/yii2-rest)What is this?
-------------![Screen](/docs/images/screen1.png)
Installation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Add
```
"zhuravljov/yii2-rest": "*",
"yiisoft/yii2-httpclient": "@dev"
```to the require section of your `composer.json` file.
Usage
-----Once the extension is installed, simply modify your application configuration as follows:
```php
return [
'bootstrap' => ['rest-client'],
'modules' => [
'rest-client' => [
'class' => 'zhuravljov\yii\rest\Module',
'name' => 'My Rest Client',
'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
```