Fixes #6446 - Forbidding non-json POST/PUT requests in v2

## Tasks
- [x] Fix any broken tests
- [x] Write new tests