wangcan/yii2-restclient

fork from zhuravljov/yii2-rest, secondary development to apply my requirement.

Installs: 14

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 24

Type:yii2-extension

1.0.3 2016-08-12 21:55 UTC

This package is auto-updated.

Last update: 2024-04-22 17:22:13 UTC


README

Latest Stable Version Build Status

What is this?

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 your composer.json file.

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',
            '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