Question 13 of 60 from exam 300-435-ENAUTO: Automating and Programming Cisco Enterprise Solutions

Question 13 of 60 from exam 300-435-ENAUTO: Automating and Programming Cisco Enterprise Solutions

Question

import requests
import sys

requests .package.urllib3.disable warnings ()

HOST = '10.1.2.37
PORT = 9443

USER = ‘user’
PASS = ‘password’

def main(
url = “https://{h}:{p}/restconf/data/Cisco-I0S-XE-native:native/
hostname”. format (h=HOST, p=PORT)

headers = { ‘Content-Type’: ‘application/

‘Accept’: ‘application/ .y

response = requests.get(url, auth=(USER, PASS) ,
headers-headers, verify-False)
print (response. text)

__name__ main _':
sys.exit (main())

Refer to the exhibit.

An engineer creates a Python script using RESTCONF to display hostname information.

The code must be completed so that it can be tested.

Which string completes the highlighted areas in the exhibit?

Answers

Explanations