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
Hi there!
I wanted to download an image with a URL that is checked by the back-end with a cookie.
If I just feed AsyncCachedImage with this URL, it brings nothing:
CachedAsyncImage(url: myURL)
So I tried to feed it with a URLRequest instead, after setting the HTTPHeaderFields of the request with my cookie.
var urlRequest = URLRequest(url: url)
urlRequest.httpShouldHandleCookies = true
var headers = [
"Content-Type": "application/json",
"Cookie": "blablabla"
]
urlRequest.allHTTPHeaderFields = headers
and then pass this URLRequest to the CachedAsyncImage:
CachedAsyncImage(urlRequest: urlRequest)
But that didn't work either.
Do you think the CachedAsyncImage actually uses the header of the request we pass?
Thanks
Frederic
The text was updated successfully, but these errors were encountered:
Hi there!
I wanted to download an image with a URL that is checked by the back-end with a cookie.
If I just feed
AsyncCachedImage
with this URL, it brings nothing:So I tried to feed it with a URLRequest instead, after setting the HTTPHeaderFields of the request with my cookie.
and then pass this URLRequest to the CachedAsyncImage:
But that didn't work either.
Do you think the CachedAsyncImage actually uses the header of the request we pass?
Thanks
Frederic
The text was updated successfully, but these errors were encountered: