Skip to content

Add-PodeSignalRoute

SYNOPSIS

Adds a Signal Route for WebSockets.

SYNTAX

Script (Default)

Add-PodeSignalRoute -Path <String> [-ScriptBlock <ScriptBlock>] [-EndpointName <String[]>]
 [-ArgumentList <Object[]>] [<CommonParameters>]

File

Add-PodeSignalRoute -Path <String> [-EndpointName <String[]>] -FilePath <String> [-ArgumentList <Object[]>]
 [<CommonParameters>]

DESCRIPTION

Adds a Signal Route, with path, that when called with invoke any logic.

EXAMPLES

EXAMPLE 1

Add-PodeSignalRoute -Path '/message' -ScriptBlock { /* logic */ }

EXAMPLE 2

Add-PodeSignalRoute -Path '/message' -ScriptBlock { /* logic */ } -ArgumentList 'arg1', 'arg2'

PARAMETERS

-ArgumentList

An array of arguments to supply to the Signal Route's ScriptBlock.

Type: Object[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndpointName

The EndpointName of an Endpoint(s) this Signal Route should be bound against.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilePath

A literal, or relative, path to a file containing a ScriptBlock for the Signal Route's main logic.

Type: String
Parameter Sets: File
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path

The URI path for the Signal Route.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScriptBlock

A ScriptBlock for the Signal Route's main logic.

Type: ScriptBlock
Parameter Sets: Script
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES