Gets all cookies as a key-value object. Note: Values are automatically URI-decoded but not JSON-parsed. Use getCookie() for automatic JSON parsing.
An object containing all cookies with their names as keys and values as strings
const allCookies = getAllCookies();console.log(allCookies);// { token: 'abc123', user: 'john', sessionId: 'xyz789' } Copy
const allCookies = getAllCookies();console.log(allCookies);// { token: 'abc123', user: 'john', sessionId: 'xyz789' }
Gets all cookies as a key-value object. Note: Values are automatically URI-decoded but not JSON-parsed. Use getCookie() for automatic JSON parsing.