Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Cisco Certified DevNet Associate (DEVASC) · Cisco
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
C is the best answer here
The question is crazy and very bad worded. If requests.login doesn''t exist, there should not be present any status code of 401, because the python script will not send anything, because it doesn't understand the syntax. Secondly, even with a get message there is no sense that the username:passoword should be json payload. It makes sense to use basic auth in this form or to use basic auth header in json format. From my point of view this question is wrong
This seems like a trick question. Simply changing "login" to "get" should fix it. You're still keeping the HTTPBasicAuth header intact while also sending the user/pass in the json payload according to this answer. Sending it in the payload shouldn't do anything since it's a simple GET. The payload will be ignored and the basic auth header will be used.