Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.

$response.SetStatusCode

Tyler James Leonhardt edited this page Nov 11, 2017 · 2 revisions

Sets the status code for the response.

Example:

New-GetRoute -Path "/helloworld" -ScriptBlock {
    $response.SetStatusCode(404);
    
    $response.Send("Not Found");
}
Clone this wiki locally