swimtobird/kong-hmac

There is no license information available for the latest version (v0.1.4) of this package.

Installs: 391

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/swimtobird/kong-hmac

v0.1.4 2018-03-20 11:16 UTC

This package is auto-updated.

Last update: 2025-10-08 18:04:41 UTC


README

Installation

composer require swimtobird/kong-hmac

HOW TO USE

  • GET
        $hamc = new Hmac('user','secret','example.com','GET');

        $hamc->setUrl('/default');

        $header = $hamc->getHeader();


        $client = new GuzzleHttp\Client(['base_uri' => 'http://example.com']);

        $request = $client->request('GET', '/default', [
            'headers' => $header
        ]);

        print json($response->getBody(),true);
  • POST
        $hamc = new Hmac('user','secret','example.com','POST');

        $hamc->setUrl('/default');

        $header = $hamc->getHeader();


        $client = new GuzzleHttp\Client(['base_uri' => 'http://example.com']);

        $request = $client->request('POST', '/default', [
            'headers' => $header
            'form_params'=>[
                'params' => 'test'
            ]            
        ]);

        print json($response->getBody(),true);
`````