Practice – devcor_350-901_api

Strength:
0%
Answered: 0 • Correct: 0 • Incorrect: 0

Logged in as Guest

Fill in missing logic to back off when Webex returns HTTP 429.

Drag the correct code snippets from the options panel into the placeholders in the code window.

import time, requests def post_with_backoff(url, headers, payload): r = requests.post(url, headers=headers, json=payload, timeout=10) if r.status_code == {{1}}: wait_s = int(r.headers.get({{2}}, "1")) time.sleep(wait_s) r = requests.post(url, headers=headers, json=payload, timeout=10) return r

Drag a snippet from the right into each blank box in the code.

Available snippets

429
503
204
"Location"
"Retry-After"
"retry_after"
"X-RateLimit-Reset"
401