src/ArtaxServiceBuilder/OperationGenerator.php
function addCreateAndExecuteMethod() {
        $methodGenerator = new MethodGenerator('createAndExecute');
        $body = '';
        $body .= $this->generateCreateFragment();
        $body .= $this->generateExecuteFragment();
        $body .= PHP_EOL;
        $body .= 'return $response;'.PHP_EOL;;
        $docBlock = new DocBlockGenerator('Create and execute the operation, returning the raw response from the server.', null);
        $tags[] = new GenericTag('return', '\Amp\Artax\Response');
        $docBlock->setTags($tags);
        
        $methodGenerator->setBody($body);
        $methodGenerator->setDocBlock($docBlock);
        $this->classGenerator->addMethodFromGenerator($methodGenerator);
    }
function addCreateAndExecuteMethod() {
        $methodGenerator = new MethodGenerator('createAndExecute');
        $body = '';
        $body .= $this->generateCreateFragment();
        $body .= $this->generateExecuteFragment();
        $body .= PHP_EOL;
        $body .= 'return $response;'.PHP_EOL;;
        $docBlock = new DocBlockGenerator('Create and execute the operation, returning the raw response from the server.', null);
        $tags[] = new GenericTag('return', '\Amp\Artax\Response');
        $docBlock->setTags($tags);
        
        $methodGenerator->setBody($body);
        $methodGenerator->setDocBlock($docBlock);
        $this->classGenerator->addMethodFromGenerator($methodGenerator);
    }
Add the method to create the request and execute it in one step