MockHttpServletRequestBuilder already contains a contentType method accepting a MediaType:
public MockHttpServletRequestBuilder contentType(MediaType mediaType) {
Assert.notNull(mediaType, "'contentType' must not be null");
this.contentType = mediaType.toString();
this.headers.set("Content-Type", this.contentType);
return this;
}
Please add a similar method which accepts a plain String.
Marcel Overdijk opened SPR-12405 and commented
MockHttpServletRequestBuilder already contains a contentType method accepting a MediaType:
Please add a similar method which accepts a plain String.
Affects: 4.1.1
Referenced from: commits bba38b8
The text was updated successfully, but these errors were encountered: