Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NativeCookieHandler does nothing (just throws) on Windows #188

Open
ncruces opened this issue Oct 16, 2015 · 1 comment
Open

NativeCookieHandler does nothing (just throws) on Windows #188

ncruces opened this issue Oct 16, 2015 · 1 comment

Comments

@ncruces
Copy link

ncruces commented Oct 16, 2015

I'm using ModernHttpClient with Refit on iOS, Android and Windows, to implement an API that requires cookies.

The NativeMessageHandler facade is perfectly usable on Windows (as long as you don't need throwOnCaptiveNetwork, RegisterForProgress, etc). NativeCookieHandler, OTOH, is useless.

Right now, I have to do this to set a cookie:

NativeCookieHandler cookies;
NativeMessageHandler handler;

(...)

try
{
    cookies.SetCookies(Enumerable.Repeat(cookie, 1));
}
catch
{
    handler.CookieContainer.Add(uri, cookie);
}

Something like #175 would fix this, but it was rejected. I don't think creating a new "platform" is necessary (if that's why it was rejected).

Would a PR implementing this under the Portable project be considered? So instead of facades, you'd have a minimally useful (portable) implementation of NativeCookieHandler (and, eventually, some of the additional NativeMessageHandler features).

@anaisbetts
Copy link
Owner

Sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants