-
Notifications
You must be signed in to change notification settings - Fork 0
Connect PodeWebSocket
external help file: Pode-help.xml Module Name: Pode online version: PodeType: WebSockets schema: 2.0.0
Connect to an external WebSocket.
Connect-PodeWebSocket -Name <String> -Url <String> [-ScriptBlock <ScriptBlock>] [-ContentType <String>]
[-ArgumentList <Object[]>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Connect-PodeWebSocket -Name <String> -Url <String> -FilePath <String> [-ContentType <String>]
[-ArgumentList <Object[]>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Connect to an external WebSocket.
Connect-PodeWebSocket -Name 'Example' -Url 'ws://example.com/some/socket' -ScriptBlock { ... }
Connect-PodeWebSocket -Name 'Example' -Url 'ws://example.com/some/socket' -ScriptBlock { param($arg1, $arg2) ... } -ArgumentList 'arg1', 'arg2'
Connect-PodeWebSocket -Name 'Example' -Url 'ws://example.com/some/socket' -FilePath './some/path/file.ps1'
Connect-PodeWebSocket -Name 'Example' -Url 'ws://example.com/some/socket' -ScriptBlock { ... } -ContentType 'text/xml'
AN optional array of extra arguments, that will be passed to the ScriptBlock.
Type: Object[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
An optional ContentType for parsing/converting received/sent messages. (default: application/json)
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: Application/json
Accept pipeline input: False
Accept wildcard characters: False
A literal, or relative, path to a file containing a ScriptBlock for the WebSocket's logic.
Type: String
Parameter Sets: File
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The Name of the WebSocket connection.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
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 ScriptBlock to invoke for processing received messages from the WebSocket. The ScriptBlock will have access to a $WsEvent variable with details of the received message.
Type: ScriptBlock
Parameter Sets: Script
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The URL of the WebSocket. Should start with either ws:// or wss://.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
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.
sss
x