src/Common/RestApiClient.php
public function raw($method, $path, $options, $withAuthorization = true)
    {
        // Find what traits this class is using.
        $class = get_called_class();
        $traits = Introspector::getAllClassTraits($class);

        if (empty($options['headers'])) {
            // Guzzle doesn't merge default headers with $options array
            $options['headers'] = $this->defaultHeaders ?: [];
        }

        // If these traits have a "hook" (uh oh!), run that before making a request.
        foreach ($traits as $trait) {
            $function = 'run'.Introspector::baseName($trait).'Tasks';
            if (method_exists($class, $method)) {
                $this->{$function}($method, $path, $options, $withAuthorization);
            }
        }

        return $this->client->request($method, $path, $options);
    }
public function raw($method, $path, $options, $withAuthorization = true)
    {
        // Find what traits this class is using.
        $class = get_called_class();
        $traits = Introspector::getAllClassTraits($class);

        if (empty($options['headers'])) {
            // Guzzle doesn't merge default headers with $options array
            $options['headers'] = $this->defaultHeaders ?: [];
        }

        // If these traits have a "hook" (uh oh!), run that before making a request.
        foreach ($traits as $trait) {
            $function = 'run'.Introspector::baseName($trait).'Tasks';
            if (method_exists($class, $method)) {
                $this->{$function}($method, $path, $options, $withAuthorization);
            }
        }

        return $this->client->request($method, $path, $options);
    }
public function raw ( $ method , $ path , $ options , $ withAuthorization = true ) { // Find what traits this class is using. $ class = get_called_class ( ) ; $ traits = Introspector :: getAllClassTraits ( $ class ) ; if ( empty ( $ options [ 'headers' ] ) ) { // Guzzle doesn't merge default headers with $options array $ options [ 'headers' ] = $ this -> defaultHeaders ? : [ ] ; } // If these traits have a "hook" (uh oh!), run that before making a request. foreach ( $ traits as $ trait ) { $ function = 'run' . Introspector :: baseName ( $ trait ) . 'Tasks' ; if ( method_exists ( $ class , $ method ) ) { $ this -> { $ function } ( $ method , $ path , $ options , $ withAuthorization ) ; } } return $ this -> client -> request ( $ method , $ path , $ options ) ; }
Send a raw API request, without attempting to handle error responses.

@param $method
@param $path
@param array $options
@param bool $withAuthorization
@return Response
Send a raw API request without attempting to handle error responses .