protected function addHeaders(ResponseInterface $response, string $body): ResponseInterface
    {
        return $response
            ->andHeader('Content-Type', 'application/json')
            ->andHeader('Content-Length', (string)strlen($body));
    }
protected function addHeaders(ResponseInterface $response, string $body): ResponseInterface
    {
        return $response
            ->andHeader('Content-Type', 'application/json')
            ->andHeader('Content-Length', (string)strlen($body));
    }
protected function addHeaders ( ResponseInterface $ response , string $ body ) : ResponseInterface { return $ response -> andHeader ( 'Content-Type' , 'application/json' ) -> andHeader ( 'Content-Length' , ( string ) strlen ( $ body ) ) ; }
Add Content-Length header to response.

@param ResponseInterface $response
@param string            $body
@return ResponseInterface
Add Content - Length header to response .