You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think response_headers_to_object is not good enough. Actually it is quite uncomfortable when multiple cookies with options are set by Set-Cookie header.
I think
response_headers_to_object
is not good enough. Actually it is quite uncomfortable when multiple cookies with options are set bySet-Cookie
header.nestia/packages/fetcher/src/internal/FetcherBase.ts
Line 256 in fbe753e
Problems
When multiple cookies are set without any option, then it's fine.
For example,
this will be converted to:
However, when cookie security options are set along like this:
now things get messy
This is not comfortable as it is hard to tell which cookie each elements belong to.
Suggestions
Fortunately,
response_headers_to_object
is parsing multiple cookies one by oneSo, I would suggest either
1. pushing cookie strings
So, let people handle their cookie themselves,
or
2. construct as object
and possibly better if you could provide type-safe getter.
The text was updated successfully, but these errors were encountered: