200-901 · Question #280
200-901 Question #280: Real Exam Question with Answer & Explanation
Sign in or unlock 200-901 to reveal the answer and full explanation for question #280. The question stem and answer options stay visible for context.
Question
Refer to the exhibit. 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?
Options
- Aresp = requests.post(url, auth=HTTPBasicAuth(DNAC_USER, DNAC_PASSWORD)) token =
- Bresp = requests.post(url, auth=(DNAC_USER, DNAC_PASSWORD)) token = resp.json ()['Token']
- Cresp = http.post(url, auth=HTTPBasicAuth(DNAC_USER, DNAC_PASSWORD)) token =
- Dresp = http.post(url, auth=(DNAC_USER, DNAC_PASSWORD)) token = resp.json()['Token']
Unlock 200-901 to see the answer
You've previewed enough free 200-901 questions. Unlock 200-901 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.