src/Service/AbstractRestController.php
protected function location($url)
    {
        /** @var $response Response */
        $response = $this->getResponse();

        $response->getHeaders()
            ->addHeaderLine(
                'Location',
                $url
            );

        $response->setStatusCode(201);

        return $response;
    }
protected function location($url)
    {
        /** @var $response Response */
        $response = $this->getResponse();

        $response->getHeaders()
            ->addHeaderLine(
                'Location',
                $url
            );

        $response->setStatusCode(201);

        return $response;
    }
protected function location ( $ url ) { /** @var $response Response */ $ response = $ this -> getResponse ( ) ; $ response -> getHeaders ( ) -> addHeaderLine ( 'Location' , $ url ) ; $ response -> setStatusCode ( 201 ) ; return $ response ; }
Returns a 201 response with a Location header

@param string $url
@return Response
Returns a 201 response with a Location header