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,
Is is possible with your library to actually get cookies from a response? See here for an example of the problem I'm trying to solve. Alamofire/Alamofire#946
Thanks
The text was updated successfully, but these errors were encountered:
class CookieInterceptor: NSObject, ResponseInterceptor {
func process<ReturnType>(endpoint: Endpoint<ReturnType>, response: NSHTTPURLResponse?, responseObject: ResponseObject) -> ProcessResults {
print(response)
for cookie in NSHTTPCookieStorage.sharedHTTPCookieStorage().cookiesForURL(response!.URL!)! {
print(cookie)
}
return ProcessResults(true, nil)
}
}
An interceptor like this should print the cookies, you would need to be pointing your build against the dev branch however. You also need to make sure to set your acceptsCookies param on your endpoint to true
This is tested against https://httpbin.org/cookies/set?k2=v2&k1=v1
Hi,
Is is possible with your library to actually get cookies from a response? See here for an example of the problem I'm trying to solve.
Alamofire/Alamofire#946
Thanks
The text was updated successfully, but these errors were encountered: