Write PodeViewResponse - mdaneri/Pode GitHub Wiki
external help file: Pode-help.xml Module Name: Pode online version: PodeType: Responses schema: 2.0.0
Renders a dynamic, or static, View on the Response.
Write-PodeViewResponse [-Path] <String> [-Data <Hashtable>] [-StatusCode <Int32>] [-Folder <String>]
[-FlashMessages] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Renders a dynamic, or static, View on the Response; allowing for dynamic data to be supplied.
Write-PodeViewResponse -Path 'index'
Write-PodeViewResponse -Path 'accounts/profile_page' -Data @{ Username = 'Morty' }
Write-PodeViewResponse -Path 'login' -FlashMessages
Any dynamic data to supply to a dynamic View.
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: @{}
Accept pipeline input: False
Accept wildcard characters: False
Automatically supply all Flash messages in the current session to the View.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
If supplied, a custom views folder will be used.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The path to a View, relative to the "/views" directory. (Extension is optional).
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The status code to set against the response.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 200
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.