View all questions & answers for the Implementing Cisco Enterprise Network Core Technologies (350-401 ENCOR) Exam Materials exam
Implementing Cisco Enterprise Network Core Technologies (350-401 ENCOR) Exam Materials-Question 170 Discussion
Comments
Selected Answers: B, E
-
Brave-Dumps.com Admin
2026-08-07 05:15:32
can you explain why? Cisco RESTCONF supports application/yang-data+json for returning YANG data in JSON format. The Requests documentation shows that response.text contains the response body as text, while response.json() converts it into a Python object. Option A incorrectly uses response.json without parentheses and attempts to write it directly.
Refer to the exhibit. Which two modifications are required so that the configuration fetched from the device is saved as a valid JSON-encoded file? (Choose two answers)
with open("config.json","w") as OutFile: OutFile.write(response.json)
at the end of the script
headers={"Accept":"application/yang-data+json"},
as a parameter to the requests.get() call
with open("config.json","w") as OutFile: OutFile.write(response.text)
at the end of the script
headers={"Accept":"application/yang-data+xml"},
as a parameter to the requests.get() call
json = True,
as a parameter to the requests.get() call
Brave-Dump Clients Votes