private function getOptions(MethodInterface $method)
    {
        if ($method->getMethod() == $method::GET) {
            return [
                'query' => $method->getAttributes(),
            ];
        }

        return [
            'headers' => [
                'Content-Type' => 'application/json',
            ],
            'body' => json_encode(
                $this->prepareAttributes($method->getAttributes()),
                JSON_FORCE_OBJECT
            )
        ];
    }
private function getOptions(MethodInterface $method)
    {
        if ($method->getMethod() == $method::GET) {
            return [
                'query' => $method->getAttributes(),
            ];
        }

        return [
            'headers' => [
                'Content-Type' => 'application/json',
            ],
            'body' => json_encode(
                $this->prepareAttributes($method->getAttributes()),
                JSON_FORCE_OBJECT
            )
        ];
    }
private function getOptions ( MethodInterface $ method ) { if ( $ method -> getMethod ( ) == $ method :: GET ) { return [ 'query' => $ method -> getAttributes ( ) , ] ; } return [ 'headers' => [ 'Content-Type' => 'application/json' , ] , 'body' => json_encode ( $ this -> prepareAttributes ( $ method -> getAttributes ( ) ) , JSON_FORCE_OBJECT ) ] ; }
Prepare request options for particular method
@param MethodInterface $method
@return array
Prepare request options for particular method