nerdexam
Cisco

200-901 · Question #509

Refer to the exhibit. A developer creates a Python script to query a REST API by using an HTTP GET request. The remote server will authorize the request only if it includes HTTP Basic Auth parameters.

Sign in or unlock 200-901 to reveal the answer and full explanation for question #509. The question stem and answer options stay visible for context.

Understanding and Using APIs

Question

Refer to the exhibit. A developer creates a Python script to query a REST API by using an HTTP GET request. The remote server will authorize the request only if it includes HTTP Basic Auth parameters. The username is admin and the password is devnet123. Which line of code needs to be placed on the snippet where the code is missing? A. B. C. D.

Exhibit

200-901 question #509 exhibit

Options

  • Arequests.get(url, auth=('admin', 'devnet123'))
  • Brequests.get(url, auth=HTTPDigestAuth('admin', 'devnet123'))
  • Crequests.get(url, auth=HTTPBasicAuth('admin': 'devnet123'))
  • Drequests.get(url, auth='admin', 'devnet123')

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.

Topics

#Python#requests library#REST API#HTTP Basic Auth
Full 200-901 Practice