Courseiva
Software Development and DesignmediumMultiple SelectObjective-mapped

200-901 Software Development and Design Practice Question

A developer is designing a Python script that needs to make multiple REST API calls to different endpoints sequentially. The script must handle the following requirements: (1) Use a variable timeout for each request, (2) Include an authorization token in every request, (3) Parse JSON responses. Which TWO features of the requests library should be used? (Choose two.)

⚠ Common exam trap

Cisco often tests the distinction between the `auth` parameter (for Basic Auth) and the `headers` parameter (for bearer tokens), causing candidates to mistakenly choose Option D when they should use Option E.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use the `timeout` parameter to specify a maximum wait time.

The `timeout` parameter in the requests library allows you to specify a maximum wait time (in seconds) for each request, directly addressing requirement (1) for a variable timeout. Option E is correct because the `headers` parameter is the standard way to include an authorization token (e.g., `{'Authorization': 'Bearer <token>'}`) in every request, satisfying requirement (2). Both features are essential for controlling request behavior and authentication in REST API calls.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Set the `data` parameter to JSON for request body.

    Why it's wrong here

    For GET requests, data is not used; for POST, use json= parameter.

  • Use the `timeout` parameter to specify a maximum wait time.

    Why this is correct

    Prevents indefinite hanging.

  • Use `verify=False` to speed up requests.

    Why it's wrong here

    Disables SSL verification, insecure and not recommended.

  • Set the `auth` parameter with a tuple (username, token).

    Why it's wrong here

    auth parameter is for HTTP Basic Auth, not bearer tokens.

  • Use the `headers` parameter to include the authorization token.

    Why this is correct

    Headers dict includes 'Authorization' key.

About these practice questions

This 200-901 question is part of Courseiva's 989-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.