Setting cookies using Next 14
Unanswered
LaPerm posted this in #help-forum
LaPermOP
hi guys, just a short question about setting cookies. How would one set multiple cookies at once using response.cookies.set(...) ??
Using older next versions with response.setHeader('Set-Cookie', [
cookie1/serialized,
cookie2/serialized,
]) ...seems clear to me, but whats the syntax with response.cookies.set(...) or cookies().set(...)? They both should be the same as far as I understood...
Using older next versions with response.setHeader('Set-Cookie', [
cookie1/serialized,
cookie2/serialized,
]) ...seems clear to me, but whats the syntax with response.cookies.set(...) or cookies().set(...)? They both should be the same as far as I understood...