Weekend Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

Exam 200-901 All Questions
Exam 200-901 All Questions

View all questions & answers for the 200-901 exam

Cisco Certified DevNet Associate 200-901 Question # 1 Topic 1 Discussion

200-901 Exam Topic 1 Question 1 Discussion:
Question #: 1
Topic #: 1

Refer to the exhibit.

200-901 Question 1

A developer creates a script to obtain a list of devices by using the Cisco DNA Center API. The remote server authorizes the request only if an authentication token is supplied in the headers. A function named get_auth_token() must retrieve a valid token by using HTTP Basic Authentication. Which code must be added to complete the get_auth_token() function?


A.

resp = requests.post(url, auth=HTTPBasicAuth(DNAC_USER, DNAC_PASSWORD))

token = resp.json()['Token']

return token


B.

resp = requests.post(url, auth=(DNAC_USER, DNAC_PASSWORD))

token = resp.json ()['Token']

return token


C.

resp = http.post(url, auth=HTTPBasicAuth(DNAC_USER, DNAC_PASSWORD))

token = resp.json()['Token']

return token


D.

resp = http.post(url, auth=(DNAC_USER, DNAC_PASSWORD))

token = resp.json()['Token']

return token


Get Premium 200-901 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.