< Summary - Kestrun — Combined Coverage

Information
Class: Public.Request.Get-KrRequestForm
Assembly: Kestrun.PowerShell.Public
File(s): /home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Request/Get-KrRequestForm.ps1
Tag: Kestrun/Kestrun@9d3a582b2d63930269564a7591aa77ef297cadeb
Line coverage
0%
Covered lines: 0
Uncovered lines: 2
Coverable lines: 2
Total lines: 24
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

File(s)

/home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Request/Get-KrRequestForm.ps1

#LineLine coverage
 1<#
 2    .SYNOPSIS
 3        Retrieves a request form value from the HTTP request.
 4    .DESCRIPTION
 5        This function accesses the current HTTP request context and retrieves the value
 6        of the request form.
 7    .EXAMPLE
 8        $value = Get-KrRequestForm
 9        Retrieves the value of the request form from the HTTP request.
 10    .OUTPUTS
 11        Returns the value of the request form, or $null if not found.
 12    .NOTES
 13        This function is designed to be used in the context of a Kestrun server response.
 14#>
 15function Get-KrRequestForm {
 16    [KestrunRuntimeApi('Route')]
 17    [CmdletBinding()]
 18    param()
 019    if ($null -ne $Context.Request) {
 20        # Get the request body value from the request
 021        return $Context.Request.Form
 22    }
 23}
 24

Methods/Properties

Get-KrRequestForm()