Cookies and sessions in API tests
QuizMedium
An API logs users in with a session cookie. Which statements are true? Choose all that apply.
- The login response sends a Set-Cookie header; the client sends the value back in a Cookie header on later requests
- A test client must keep and resend the cookie, or later calls look anonymous
- The HttpOnly flag stops JavaScript in the page from reading the cookie
- Session cookies make the API stateless
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.