Network Assurance

A RESTCONF GET request receives HTTP 406 because its Accept header requests an unsupported representation. The server supports YANG data encoded as JSON; which replacement header should the client send?

Show the answer

Correct answerA. Accept: application/yang-data+json

AWhy this is right: This Accept header requests the supported RESTCONF JSON representation.

BWhy not this: This describes an XML request body and does not request a JSON response.

CWhy not this: Generic JSON is not the RESTCONF YANG-data media type specified as supported by the server.

DWhy not this: Content-Type describes the request body rather than the desired response representation.

Accept specifies the response representation the client can receive; application/yang-data+json identifies JSON-encoded YANG data. Content-Type describes a request body's representation and does not resolve response negotiation for this GET.