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
According to the playwright official site
"Fetch Sends HTTP(S) request and returns its response. The method will populate request cookies from the context and update context cookies from the response. The method will automatically follow redirects. JSON objects can be passed directly to the request. "
However when I call page.Request().Fetch(URL, opts)
it does not seem to populate the the coookie from the browser context. I tried to manually encode the cookie into the header and was able to get the response from the API endpoint. The problem remains is that the cookie from the browser context does not automatically updated from the response. Did I miss something or I made the Fetch call in a wrong way?
The text was updated successfully, but these errors were encountered:
Thank you for the response. The thing is that the cookie is atually correct in page.Context().Cookies(). There is no need to add optional cookie. The porblem is that when I make the call, for example, page.Request().Get(URL) it does not send the get request with cookie :( I have also looked into the code of get() and fetch() function. It does not seem to populate the cookie from context anywhere.
According to the playwright official site
"Fetch Sends HTTP(S) request and returns its response. The method will populate request cookies from the context and update context cookies from the response. The method will automatically follow redirects. JSON objects can be passed directly to the request. "
However when I call
page.Request().Fetch(URL, opts)
it does not seem to populate the the coookie from the browser context. I tried to manually encode the cookie into the header and was able to get the response from the API endpoint. The problem remains is that the cookie from the browser context does not automatically updated from the response. Did I miss something or I made the Fetch call in a wrong way?
The text was updated successfully, but these errors were encountered: