Rest API - Authentication and AuthorizationWhich HTTP header is used to send credentials in Basic Authentication?AContent-TypeBAcceptCAuthorizationDUser-AgentCheck Answer
Step-by-Step SolutionSolution:Step 1: Identify the header for credentialsBasic Authentication sends credentials in the 'Authorization' header.Step 2: Eliminate unrelated headers'Content-Type' defines data format, 'Accept' defines response format, 'User-Agent' identifies client software, none carry credentials.Final Answer:Authorization -> Option CQuick Check:Credentials header = Authorization [OK]Quick Trick: Credentials go in Authorization header, not Content-Type [OK]Common Mistakes:Using Content-Type to send credentialsConfusing Accept header with AuthorizationSending credentials in User-Agent header
Master "Authentication and Authorization" in Rest API9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Rest API Quizzes Authentication and Authorization - JWT structure and flow - Quiz 3easy Error Handling - Nested error reporting - Quiz 14medium Error Handling - Validation error details - Quiz 7medium Error Handling - Nested error reporting - Quiz 13medium Error Handling - Validation error details - Quiz 3easy HATEOAS and Linking - Action links for state transitions - Quiz 5medium HATEOAS and Linking - HAL format overview - Quiz 12easy Pagination Patterns - Offset-based pagination - Quiz 13medium Pagination Patterns - Offset-based pagination - Quiz 14medium Rate Limiting and Throttling - Rate limit headers (X-RateLimit) - Quiz 13medium