Free Cisco 350-901 Actual Exam Questions - Question 12 Discussion
Refer to the exhibit.
Which line of code needs to be placed on the snippet where the code is missing to provide APl rate- limiting to the requests?
B looks right since headers use get() not post(), and response fits better here.
The snippet seems to use a local variable named response rather than self.response, so C and A can be ruled out because they reference self.response. Also, using .post() on headers doesn’t make sense since headers are typically accessed with .get(). That leaves B as the clean and correct choice because it uses response.headers.get('Retry-After') with proper quotes. D is invalid too because it uses .post(). So yeah, B fits best for standard header retrieval syntax here.
It’s B, since .get() is the right method and ‘response’ fits the snippet.
Option B looks good because it uses response.headers.get with correct quotes.
Maybe B, since it uses the right method for getting headers and matches usual syntax. The others look off with ‘post’ or missing quotes.