200-901 · Question #204
A developer is creating a script to interact with a REST API service which requires basic authentication. The credentials are "devnet:391665405" and the Base64 encoding of the credentials is…
The correct answer is B. payload = { } headers= { 'Authorization' : 'Basic GV2bmV0dXNlcjpDaXNj=', 'Content-Type' : 'application/json' }. HTTP Basic Authentication requires the Authorization header in the format: 'Basic <base64-encoded-credentials>'. The keyword 'Basic' signals to the server that the credential string is a Base64-encoded username:password pair. Options C and D use 'Bearer' instead of 'Basic'…
Question
A developer is creating a script to interact with a REST API service which requires basic authentication. The credentials are "devnet:391665405" and the Base64 encoding of the credentials is "GV2bmV0dXNlcjpDaXNj=". Which payload and header combination must be used for authentication? A. B. C. D.
Exhibits
Options
- Apayload = { } headers= { 'Authorization' : 'Basic GV2bmV0dXNlcjpDaXNj=', 'Content-Type' : 'application/json' }
- Bpayload = { } headers= { 'Authorization' : 'Basic GV2bmV0dXNlcjpDaXNj=', 'Content-Type' : 'application/json' }
- Cpayload = { } headers= { 'Authorization' : 'Bearer GV2bmV0dXNlcjpDaXNj=', 'Content-Type' : 'application/json' }
- Dpayload = { } headers= { 'Authorization' : 'Bearer GV2bmV0dXNlcjpDaXNj=', 'Content-Type' : 'application/json' }
How the community answered
(15 responses)- B80% (12)
- C13% (2)
- D7% (1)
Explanation
HTTP Basic Authentication requires the Authorization header in the format: 'Basic <base64-encoded-credentials>'. The keyword 'Basic' signals to the server that the credential string is a Base64-encoded username:password pair. Options C and D use 'Bearer' instead of 'Basic' - Bearer is used for token-based authentication (e.g., OAuth 2.0 tokens), not Basic Auth. Options A and B both appear structurally identical in this question, but B is the intended correct answer representing proper Basic Auth syntax with the empty payload and the correct 'Basic' scheme.
Topics
Community Discussion
No community discussion yet for this question.



