$this->response->setComponentParameter() => Required Parameters not clear to me

Hello!

Currently, I’m bringing my system from Typo3 Flow to Neos Flow 6.0.5.

In a certain action controller, I would like to show a file. My old code looks like this:

        $this->response->setHeader("Content-Type", "application/pdf");
    $this->response->setHeader("Content-Disposition", "inline; filename=".$itemIdent.".pdf");
    $this->response->setContent($content);

So, I’m trying to translate this to Neos Flow:

        $this->response->setContentType("application/pdf");
    $this->response->setContent($content);
    $this->response->setComponentParameter("???", "Content-Disposition","inline; filename=".$itemIdent.".pdf");

For “???” is “string $componentClassName” expected - however, I do not understand, what exactly I have to insert here.

I’m looking forward for any kind of hint… thank you!

Tobi

Hey sorry for the late answer, you need to insert the class name of the \Neos\Flow\Http\Component\SetHeaderComponent

Dear Christian, thank you for your kind answer. My reaction to it took even longer - so far, no problem :slight_smile:

\Neos\Flow\Http\Component\SetHeaderComponent::class

works fine for me. Thank you very much!