-
Notifications
You must be signed in to change notification settings - Fork 0
Send PodeSseEvent
Send an Event to one or more SSE connections.
Send-PodeSseEvent [-Data] <Object> [-Id <String>] [-EventType <String>] [-Depth <Int32>] [-FromEvent]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Send-PodeSseEvent [-Data] <Object> -Name <String> [-Group <String[]>] [-ClientId <String[]>] [-Id <String>]
[-EventType <String>] [-Depth <Int32>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Send an Event to one or more SSE connections. This can either be:
- Every client for an SSE connection Name
- Specific ClientIds for an SSE connection Name
- The current SSE connection being referenced within $WebEvent.Sse
Send-PodeSseEvent -FromEvent -Data 'This is an event'
Send-PodeSseEvent -FromEvent -Data @{ Message = 'A message' }
Send-PodeSseEvent -Name 'Actions' -Data @{ Message = 'A message' }
Send-PodeSseEvent -Name 'Actions' -Group 'admins' -Data @{ Message = 'A message' }
Send-PodeSseEvent -Name 'Actions' -Data @{ Message = 'A message' } -ID 123 -EventType 'action'
An optional array of 1 or more SSE connection ClientIds to send Events to, for the specified SSE connection Name.
Type: String[]
Parameter Sets: Name
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The Data for the Event being sent, either as a String or a Hashtable/PSObject. If the latter, it will be converted into JSON.
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
The Depth to generate the JSON document - the larger this value the worse performance gets.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 10
Accept pipeline input: False
Accept wildcard characters: False
An optional EventType for the Event being sent.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If supplied, the SSE connection Name and ClientId will atttempt to be retrived from $WebEvent.Sse. These details will be set if ConvertTo-PodeSseConnection has just been called. Or if X-PODE-SSE-CLIENT-ID and X-PODE-SSE-NAME are set on an HTTP request.
Type: SwitchParameter
Parameter Sets: WebEvent
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
An optional array of 1 or more SSE connection Groups to send Events to, for the specified SSE connection Name.
Type: String[]
Parameter Sets: Name
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
An optional ID for the Event being sent.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
An SSE connection Name.
Type: String
Parameter Sets: Name
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
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