nerdexam
MuleSoft

MCD-LEVEL-1 · Question #83

The web client sends a POST request to the ACME Order API with an XML payload. An error is returned. What should be changed in the request so that a success response code is returned to the web…

The correct answer is B. Set a request header with the name Content-Type to a value of application/xml. 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…

Consuming REST APIs

Question

The web client sends a POST request to the ACME Order API with an XML payload. An error is returned. What should be changed in the request so that a success response code is returned to the web client?

Exhibit

MCD-LEVEL-1 question #83 exhibit

Options

  • ASet a request header with the name Content-Type to a value of applicatron/octet-stream
  • BSet a request header with the name Content-Type to a value of application/xml
  • CSet a response header with the name Content-Type to a value of applkation/xml
  • DSet a response header with the name Content-Type to a value of application/octet-stream

How the community answered

(23 responses)
  • B
    87% (20)
  • C
    9% (2)
  • D
    4% (1)

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. As per RAML input is expected in application/xml. Hence correct answer is Set a request header with the name Content-Type to a

Topics

#Content-Type header#HTTP request#XML payload#API request headers

Community Discussion

No community discussion yet for this question.

Full MCD-LEVEL-1 Practice