Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Cisco Certified DevNet Associate (DEVASC) · Cisco
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
I think it's C. Why C is the better exam answer The question says the engineer wants to: -use an API -update interface information -in a RESTCONF-style workflow -and the choices are asking for the header line
should be A, as in learning LABs from CISCO https://developer.cisco.com/learning/labs/intro-restconf/ RESTCONF Headers and MIME Types One of the major advantages RESTCONF has over NETCONF is its ability to use JSON as a data format. Many developers prefer JSON (over XML) because of its readability and lower overhead. When crafting a RESTCONF request, you specify the data format being sent and requested by the agent. This is done in a typical HTTP way; using request headers: Content-Type: Specify the type of data being sent from the client Accept: Specify the type of data being requested by the client RESTCONF describes the following MIME types to be used in these headers to indicate the format being requested. application/yang-data+json application/yang-data+xml
The correct MIME type for data transmitted using the RESTCONF protocol is application/yang.data+json, which indicates that the data is in JSON format and follows the YANG data model. Alternatively, if the data is transmitted in XML format, the MIME type would be application/yang.data+xml. Therefore, the correct line of code to place in the snippet where it is missing would be either {'Content-Type': 'application/yang.data+json', 'Accept': 'application/yang.data+json'} or {'Content-Type': 'application/yang.data+xml', 'Accept': 'application/yang.data+xml'}, depending on the format of the data being transmitted.