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
Due to HttpClientHandler's limitations described in issues #413, we need to configure our pipeline to use optimized native Http handlers for Xamarin.Android (AndroidClientHandler) and Xamarin.iOS (NSUrlSessionHandler) as our final handler.
Workaround
The workaround involves setting up a new pipeline for each platform with the platforms native http handler set as the finalHandler. This is cumbersome and can be error prone if not configured correctly.
#if __ANDROID__varinnerHandler=newXamarin.Android.Net.AndroidClientHandler{AllowAutoRedirect=false};varpipeline=GraphClientFactory.CreatePipeline(GraphClientFactory.CreateDefaultHandlers(authProvider),innerHandler);httpProvider=newHttpProvider(pipeline,true,newSerializer());
#elif __IOS__varinnerHandler=newNSUrlSessionHandler{AllowAutoRedirect=false};varhandlers=GraphClientFactory.CreateDefaultHandlers(authProvider);// Remove CompressionHandler from pipeline when using NSUrlSessionHandler.handlers.Remove(handlers.FirstOrDefault((h)=>h.GetType().Equals(typeof(CompressionHandler))));// We need to provide a method to remove handlers by type. varpipeline=GraphClientFactory.CreatePipeline(handlers,innerHandler);httpProvider=newHttpProvider(pipeline,true,newSerializer());
#else // UWPhttpProvider=newHttpProvider();
#endif
returnnewGraphServiceClient(authProvider,httpProvider);
The text was updated successfully, but these errors were encountered:
Issue
Due to
HttpClientHandler's
limitations described in issues #413, we need to configure our pipeline to use optimized native Http handlers forXamarin.Android
(AndroidClientHandler
) andXamarin.iOS
(NSUrlSessionHandler
) as our final handler.Workaround
The workaround involves setting up a new pipeline for each platform with the platforms native http handler set as the finalHandler. This is cumbersome and can be error prone if not configured correctly.
The text was updated successfully, but these errors were encountered: