Json and XML visitors do not set correct Content-type when path has known extension

When the request path has known extension, content-type is added inside of `$request->setBody()`, because it's called before setting content-type. And it's inferred from path.

Current tests have empty paths, so they works.