spring-framework / org.springframework.test.web.servlet.result / JsonPathResultMatchers / prefix

prefix

open fun prefix(prefix: String): JsonPathResultMatchers

Configures the current JsonPathResultMatchers instance to verify that the JSON payload is prepended with the given prefix.

Use this method if the JSON payloads are prefixed to avoid Cross Site Script Inclusion (XSSI) attacks.

Parameters

prefix - the string prefix prepended to the actual JSON payload

Since
4.3