2017 © Pedro Peláez
 

library rest-exception-handler

An exception handler used to handle and parse all errors from the rest lib requests

image

cct-marketing/rest-exception-handler

An exception handler used to handle and parse all errors from the rest lib requests

  • Monday, April 9, 2018
  • by SSHVersionControl
  • Repository
  • 2 Watchers
  • 0 Stars
  • 92 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 1740 % Grown

The README.md

REST Exception Handler

An exception handler using the decorator pattern to wrap the client requests from the REST lib and parse the server responses in correctly correctly form format exceptions based on api format, (*1)

Installation

composer require cct-marketing/rest-execption-handler

Usage

use CCT\Component\Rest\AbstractClient;
use CCT\Component\Rest\Config;

class RESTClient extends AbstractClient
{
    /**
     * @return ScrapeRequest
     */
    public function myAPI(): MyRequest
    {
        $config = clone $this->config;
        $modelClass = TestModel::class;

        $serializer = $this->getBuiltSerializer($config);
        if ($this->shouldUseDefaultResponseTransformers() && null !== $serializer) {
            $this->applyDefaultResponseTransformers($config, $serializer, $modelClass);
        }

        return $this->createRequestInstance(TestRequest::class, $config, null);
    }
}

The Versions

09/04 2018

dev-master

9999999-dev

An exception handler used to handle and parse all errors from the rest lib requests

  Sources   Download

MIT

The Requires

 

The Development Requires

09/04 2018

v1.0.3

1.0.3.0

An exception handler used to handle and parse all errors from the rest lib requests

  Sources   Download

MIT

The Requires

 

The Development Requires

09/04 2018

v1.0.2

1.0.2.0

An exception handler used to handle and parse all errors from the rest lib requests

  Sources   Download

MIT

The Requires

 

The Development Requires

09/04 2018

v1.0.1

1.0.1.0

An exception handler used to handle and parse all errors from the rest lib requests

  Sources   Download

MIT

The Requires

 

The Development Requires

09/04 2018

v1.0.0

1.0.0.0

An exception handler used to handle and parse all errors from the rest lib requests

  Sources   Download

MIT

The Requires

 

The Development Requires