200-901 · Question #120
FILL BLANK Fill in the blanks to complete the Python script to update the Webex Teams membership of a room using the Python requests library. import requests url =…
The correct answer is A. request. The Python requests library exposes a generic requests.request() method that accepts an HTTP verb string along with the URL, headers, and data parameters needed to execute any API call.
Question
Options
- Arequest
How the community answered
(43 responses)- A100% (43)
Why each option
The Python requests library exposes a generic requests.request() method that accepts an HTTP verb string along with the URL, headers, and data parameters needed to execute any API call.
requests.request('PATCH', url, headers=headers, data=payload) is the generic call signature of the Python requests library, where the first argument is the HTTP method string - here 'PATCH' to partially update an existing Webex Teams membership - followed by the target URL, the headers dictionary containing the Bearer token and Content-Type, and the JSON payload.
Concept tested: Python requests library generic request method for REST API calls
Source: https://requests.readthedocs.io/en/latest/api/#requests.request
Topics
Community Discussion
No community discussion yet for this question.