public IList <Square.OkHttp3.Cookie> LoadForRequest(Square.OkHttp3.HttpUrl p0)
        {
            var cookies = new List <Square.OkHttp3.Cookie>();

            var nc = CookieStore.Get(p0.Uri());

            foreach (var cookie in nc)
            {
                if (PathMatches(p0.EncodedPath(), cookie.Path))
                {
                    var builder = new Square.OkHttp3.Cookie.Builder();
                    builder.Name(cookie.Name)
                    .Value(cookie.Value)
                    .Domain(cookie.Domain)
                    .Path(cookie.Path);
                    if (cookie.Secure)
                    {
                        builder.Secure();
                    }

                    cookies.Add(builder.Build());
                }
            }

            return(cookies);
        }
Exemple #2
0
 public T Get <T>(string key)
 {
     return((T)_angularCookieStore.Get(key));
 }