CCNP 350-401 ENCOR Question 154 DISCUSSION

  • 815 views
  • 2023-06-24
« Back to Main Menu

Refer to the exhibit. An engineer is using XML in an application to send information to a RESTCONF-enable 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?

Q154

A. The Accept header sent was application/xml
B. POST was used instead of PUT to update
C. The Content-Type header sent was application/xml
D. A JSON body was used

Refer to the exhibit. An engineer is using XML in an application to send information to a RESTCONF-enable 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?

Q154

A. The Accept header sent was application/xml
B. POST was used instead of PUT to update
C. The Content-Type header sent was application/xml
D. A JSON body was used

Correct Answer: A

Support AceITCert.com by buying stuff you need!

1 Comments

IgorLVG

Accept and Content-type are both headers sent from a client (a browser) to a service.
Accept header is a way for a client to specify the media type of the response content it is
expecting and Content-type is a way to specify the media type of request being sent from the
client to the server.
The response was sent in XML so we can say the Accept header sent was application/xml.

Tested using Postman.
When using application/xml on the Accept Header (HTTP 400 Bad Request):
{
"errors": {
"error": [
{
"error-message": "mismatched keypaths: /interface , /if:interfaces",
"error-path": "/ietf-interfaces:interfaces",
"error-tag": "malformed-message",
"error-type": "application"
}]}}

When using application/xml on the Content-Type Header (HTTP 415 Unsupported Media Type):
{
"errors": {
"error": [
{
"error-message": "Unsupported media type: application/xml ; Should be one of: application/yang-data+xml, application/yang-data+json.",
"error-tag": "malformed-message",
"error-type": "application"
}]}}

2024-09-07 22:17:02
In order to participate in the comments you need to be logged-in.
You can sign-up or login (it's free).