Core
WebSocketRequestShape
Request shape the builder of a WebSocketDefinition may return, where P is the endpoint path.
@defjs/core · Type
Signature
type WebSocketRequestShape<P extends string> = { body?: never; headers?: never; path?: PathValue<P>; query?: URLSearchParams | QueryRecord; };
pathsupplies the:namesegments ofP: one scalar value per name. It isneverwhen the path has none.queryis aURLSearchParamsor a record of scalars, arrays, and nested records.headersandbodyarenever. A WebSocket handshake takes neither from the builder; put credentials inbeforeConnector an interceptor.
Members
Prop
Type
body? undefinedWebSocket handshakes cannot have a body. Use session.send after connecting.
headers? undefinedWebSocket builders cannot set handshake headers.
path? PathValue<P> | undefinedExplicit values for path placeholders. Anonymous objects use template keys; typed objects apply their struct aliases.
query? QueryRecord | URLSearchParams | undefinedURLSearchParams passes through unchanged; objects are encoded first. Configure the Client's query serializer for nested query values.