http4k / org.http4k.servirtium / InteractionOptions
interface InteractionOptions
General controls for the Servirtium interactions and how they are recorded to the storage format. The manipulations are used to replace/remove any dynamic parts of the request (eg. “Date” header) so that the traffic can be correctly matched during the replay process.
Name | Summary |
---|---|
debugTraffic | Turn on/off the printing of raw HTTP traffic to the console.open fun debugTraffic(): Boolean |
isBinary | Determine if the content type from a message should be treated as binary.open fun isBinary(contentType: ContentType ?): Boolean |
modify | Modify received requests before they are stored. Use this to replace/remove dynamic parts of the message before serialisation.open fun modify(request: Request ): Request Modify received responses before they are stored. Use this to replace/remove dynamic parts of the message before serialisation. open fun modify(response: Response ): Response |
Name | Summary |
---|---|
Defaults | By default, no modifications are made to the raw traffic before it gets output to disk. This will not be used very often as dynamic headers such as “Date” and “User-Agent” will almost always be present and need to be stripped out.val Defaults: InteractionOptions |
Name | Summary |
---|---|
trafficPrinter | fun InteractionOptions .trafficPrinter(): Filter |