It doesn't allow access to request and response headers.
It returns a JSON String and sets the mimetype to text/plain.
It returns a JSON String and sets the mimetype to text/javascript.
Given the following method:
@RequestMapping(method=RequestMethod.GET, value="/fooBar")
public ResponseEntity<String> fooBar2() {
String json = "jsonResponse";
HttpHeaders responseHeaders = new HttpHeaders();
responseHeaders.setContentType(MediaType.APPLICATION_JSON);
return new ResponseEntity<String>(json, responseHeaders, HttpStatus.CREATED);
}
Which of the following statements is correct?
Correct Answer:
It returns a JSON String and sets the mimetype to text/javascript.
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Spring MVC MCQ Questions