MCD-LEVEL-1 · Question #12
MCD-LEVEL-1 Question #12: Real Exam Question with Answer & Explanation
The correct answer is C. Set the request Content-Type header to application/] son. The HTTP 415 Unsupported Media Type client error response code indicates that the server refuses to accept the request because the payload format is in an unsupported format. The format problem might be due to the request's indicated Content-Type or Content-Encoding , or as a res
Question
Exhibits
Options
- Aset the response Content-Type header to text/plain
- Bset the response Content-Type header to application/json
- CSet the request Content-Type header to application/] son
- Dset the request Content-Type header to text/plain
Explanation
The HTTP 415 Unsupported Media Type client error response code indicates that the server refuses to accept the request because the payload format is in an unsupported format. The format problem might be due to the request's indicated Content-Type or Content-Encoding , or as a result of inspecting the data directly. In this case as per RAML specification data is expected in application/json and in request Content-Type is set as "text/plain" which is incorrect. Hence solution is set the request Content-Type header to application/json https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/415
Community Discussion
No community discussion yet for this question.

