WebSocketRequestTransform | mockttp
This defines the request transforms that we support for all passed through requests (both HTTP and WebSockets).
Hierarchy (view full)
- PassThroughInitialTransforms
- WebSocketRequestTransform
Index
Properties
OptionalmatchReplaceHost
match
replacements: MatchReplacePairs;
updateHostHeader?: string | boolean;
}
OptionalmatchReplacePath
Perform a series of string match & replace operations on the request path.
OptionalmatchReplaceQuery
Perform a series of string match & replace operations on the request query string.
OptionalreplaceHost
replace
targetHost: string;
updateHostHeader?: string | boolean;
}
OptionalsetProtocol
set
Override the request protocol. If replaceHost & matchReplaceHost are not specified and the URL no explicitly specified port, this will automatically switch to the appropriate port (e.g. from 80 to 443).