2017 © Pedro Peláez
 

yii2-extension service1c

Component for executing requests to HTTP Services 1C

image

novatorgroup/service1c

Component for executing requests to HTTP Services 1C

  • Wednesday, November 29, 2017
  • by novatorgroup
  • Repository
  • 1 Watchers
  • 0 Stars
  • 17 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

HTTP Service 1C

Component for executing requests to HTTP Services 1C, (*1)

Installation

The preferred way to install this extension is through composer. Either run, (*2)

php composer.phar require --prefer-dist novatorgroup/service1c "*"

or add, (*3)

"novatorgroup/service1c": "*"

to the require section of your composer.json file., (*4)

Usage

    $service = new \novatorgroup\service1c\HttpService([
        'host' => 'http://host.com', //required
        'base' => 'base', //required
        'login' => 'login',
        'password' => 'password',
        'curlOptions' => [
            CURLOPT_CONNECTTIMEOUT_MS => 200,
            CURLOPT_TIMEOUT_MS => 1000,
        ]
    ]);

    // GET
    // Request to: // http://host.com/base/hs/command/param?key=value

    $response = $service->get('command', ['param', 'key' => 'value']);

    if ($response->isOk()) {
        echo $response->code;
        echo $response->error;
        echo $response->result;
        echo $response->getHeader('Content-Length');
    }

    // POST
    // the body will be sent in JSON format
    $response = $service->post('command', ['param' => 'value1', 'param2' => ['a', 'b']]);

    // JSON
    {
        "param": "value1",
        "param2": [
            "a",
            "b"
        ]    
    }

The Versions

29/11 2017

dev-master

9999999-dev

Component for executing requests to HTTP Services 1C

  Sources   Download

MIT

The Requires

 

by Melnikov Ruslan

http yii 1c

29/11 2017

1.1.0

1.1.0.0

Component for executing requests to HTTP Services 1C

  Sources   Download

MIT

The Requires

 

by Melnikov Ruslan

http yii 1c

23/11 2017

1.0.0

1.0.0.0

Component for executing requests to HTTP Services 1C

  Sources   Download

MIT

The Requires

 

by Melnikov Ruslan

http yii 1c