Refer to the exhibit. An API call is constructed to retrieve the inventory in XML format by using the API. The response to the call is 401 Unauthorized. Which two headers must be added to the API call? (Choose two.)
A.
Bearer-Token: dXNlcm5hbWU6cGFzc3dvcmQ=
B.
Content-Type: application/xml
C.
Authentication: Bearer dXNlcm5hbWU6cGFzc3dvcmQ=
Additional context:
A. is Incorrect because there is no Bearer-Token header in HTTP
B. is Incorrect, because the image shows Method GET, and Content-Type header defines the type of data you use in the payload of a Method POST
C. is incorrect, because Authentication is not the correct HTTP header
D. is correct, because Accept header defines the expected response data format of a Method GET
E. is correct, because the header Authorization is the one used for OAuth and Basic Auth
Answer is B and E. Here is a sample of a CURL command
$ curl --request GET 'http://localhost:8080/restconf/data/tailfncs:
devices/device' \
--header 'Content-Type: application/yang-data+json' \
--header 'Authorization: Bearer YWRtaW46YWRtaW4='
Another crappy question, as on the documentation provided on the question it says the response type in XML is not supported ... But yeah, D and E make sense according to the question, not to the doc provided in the question
upvoted 3 times
...
...
...
This section is not available anymore. Please use the main Exam Page.200-901 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
airone
Highly Voted 1 year, 6 months agoaprettyparrot
1 year, 6 months agoCheporing
Highly Voted 1 year, 4 months agoDASBOL
Most Recent 10 months, 1 week agoDenskyDen
1 year, 6 months agoDenskyDen
1 year, 6 months agoImAlwaysRight
1 year, 5 months ago