< Back
Write-PodeCsvResponse
Post
NAME Write-PodeCsvResponse
SYNOPSIS
Writes CSV data to the Response.
SYNTAX
Write-PodeCsvResponse -Value <Object> [-StatusCode <Int32>] [<CommonParameters>]
Write-PodeCsvResponse -Path <String> [-StatusCode <Int32>] [<CommonParameters>]
DESCRIPTION
Writes CSV data to the Response, setting the content type accordingly.
PARAMETERS
-Value <Object>
A String, PSObject, or HashTable value.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Path <String>
The path to a CSV file.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-StatusCode <Int32>
The status code to set against the response.
Required? false
Position? named
Default value 200
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Write-PodeCsvResponse -Value "Name`nRick"
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Write-PodeCsvResponse -Value @{ Name = 'Rick' }
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Write-PodeCsvResponse -Path 'E:/Files/Names.csv'
RELATED LINKS
SYNOPSIS
Writes CSV data to the Response.
SYNTAX
Write-PodeCsvResponse -Value <Object> [-StatusCode <Int32>] [<CommonParameters>]
Write-PodeCsvResponse -Path <String> [-StatusCode <Int32>] [<CommonParameters>]
DESCRIPTION
Writes CSV data to the Response, setting the content type accordingly.
PARAMETERS
-Value <Object>
A String, PSObject, or HashTable value.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Path <String>
The path to a CSV file.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-StatusCode <Int32>
The status code to set against the response.
Required? false
Position? named
Default value 200
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Write-PodeCsvResponse -Value "Name`nRick"
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Write-PodeCsvResponse -Value @{ Name = 'Rick' }
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Write-PodeCsvResponse -Path 'E:/Files/Names.csv'
RELATED LINKS