350-401 · Question #206
Refer to the exhibit. An engineer is using XML in an application to send information to a RESTCONF-enabled device. After sending the request, the engineer gets this response message and a HTTP respons
The correct answer is A. The Accept header sent was application/xml. Explanation Option A is correct because a 400 Bad Request in RESTCONF with an XML application typically indicates a mismatch between what the server can return and what the client is requesting - specifically, when the Accept header is set to application/xml, the server cannot fu
Question
Refer to the exhibit. An engineer is using XML in an application to send information to a RESTCONF-enabled device. After sending the request, the engineer gets this response message and a HTTP response code of 400. What do these responses tell the engineer?
Exhibits
Options
- AThe Accept header sent was application/xml
- BPOST was used instead of PUT to update
- CThe Content-Type header sent was application/xml.
- DJSON body was used
How the community answered
(25 responses)- A88% (22)
- B8% (2)
- C4% (1)
Explanation
Explanation
Option A is correct because a 400 Bad Request in RESTCONF with an XML application typically indicates a mismatch between what the server can return and what the client is requesting - specifically, when the Accept header is set to application/xml, the server cannot fulfill that format preference, triggering the error, since RESTCONF requires the proper media type format of application/yang-data+xml (not plain application/xml).
Option B is incorrect because using POST instead of PUT would typically generate a 405 Method Not Allowed or a 409 Conflict response, not a 400. Option C is incorrect because the Content-Type header (which describes the sent body format) being application/xml would be the sending side issue - but the 400 error here points to the Accept header (what the client wants to receive), not what it sent. Option D is incorrect because using a JSON body with an XML Content-Type would cause a parsing/format mismatch, but the scenario specifies XML is being used throughout.
Memory Tip: Think of it this way - "Accept = what you'll accept back." If you tell the server you'll accept plain
application/xmlbut RESTCONF needsapplication/yang-data+xml, the server rejects it with a 400. Always use the YANG-specific media types in RESTCONF requests!
Topics
Community Discussion
No community discussion yet for this question.

