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

$response.SetContentType

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

Sets the content type for the response.

Example:

New-GetRoute -Path "/helloworld" -ScriptBlock {
    $json = @{ wow = "hey" }
    $response.SetContentType("application/json");
    
    $response.Send((ConvertTo-Json $json));
}
Clone this wiki locally