swimtobird/kong-hmac

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

Maintainers

Package info

github.com/swimtobird/kong-hmac

pkg:composer/swimtobird/kong-hmac

Statistics

Installs: 391

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

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

This package is auto-updated.

Last update: 2026-03-08 19:03:09 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);
`````