I've set up my application's content negotiator for json and XML requests but this does not prevent sending in form-data which in some cases breaks the keys because dots and spaces are being converted to underscores see: Why . (dot) and space are changed to _ (underscores) in PHP $_GET array?
Both setting the content negotiator and the parser does not prevent this and the docs did not mention any "revokable" content types.
'bootstrap' => [
'log', [
'class' => 'yii\filters\ContentNegotiator',
'formats' => [
'application/json' => Response::FORMAT_JSON,
'application/xml' => Response::FORMAT_XML,
],
],
]
'components' => [
'request' => [
'parsers' => [
'application/json' => 'yii\web\JsonParser',
],
],
]