nerdexam
CiscoCisco

350-601 · Question #643

350-601 Question #643: Real Exam Question with Answer & Explanation

The correct answer is A: application/json. The script in the exhibit is using the Cisco NX-API to send configuration commands to a Cisco Nexus 9000 Series Switch. Since the output_format in the XML body is specified as json (line 14), the appropriate content type for the headers should be application/json. This ensures th

Automation

Question

Refer to the exhibit. An engineer must create a Python script that uses the Cisco NX-API CLI to configure hostnames on a Cisco Nexus 9000 Series Switch. The output of the script must be encoded in JSON. Which snippet code on line 5 completes the script?

Options

  • Aapplication/json
  • Btext/json
  • Capplication/xml
  • Dtext/xml

Explanation

The script in the exhibit is using the Cisco NX-API to send configuration commands to a Cisco Nexus 9000 Series Switch. Since the output_format in the XML body is specified as json (line 14), the appropriate content type for the headers should be application/json. This ensures that the response from the switch is expected to be in JSON format and correctly processed by

Topics

#NX-API#Python scripting#JSON#API interaction

Community Discussion

No community discussion yet for this question.

Full 350-601 PracticeBrowse All 350-601 Questions