示例#1
0
        /// <summary>
        /// Sets a cookie for a certain url.
        /// </summary>
        /// <param name="url">The url to which cookie will be set.</param>
        /// <param name="cookie">The cookie string to set.</param>
        public void SetCookie(string url, string cookie)
        {
            Setup();

#if UNIWEBVIEW3_SUPPORTED
            UniWebViewInterface.SetCookie(url, cookie, false);
#elif UNIWEBVIEW2_SUPPORTED
            UniWebViewPlugin.SetCookie(url, cookie);
#else
            WWebViewPlugin.SetCookie(url, cookie);
#endif
        }
示例#2
0
 /// <summary>
 /// Set a cookie for the given URL. Any existing cookie with the same host,
 /// path and name will be replaced with the new cookie. The cookie being set
 /// will be ignored if it is expired.
 /// </summary>
 /// <param name="url">The URL for which the cookie is to be set.</param>
 /// <param name="cookie">The cookie as a string, using the format of the 'Set-Cookie' HTTP response header.</param>
 public static void SetCookie(string url, string cookie)
 {
     UniWebViewPlugin.SetCookie(url, cookie);
 }
示例#3
0
    public static void SetCookie(string url, string cookie)
    {
#if UNITY_IOS || UNITY_ANDROID || UNITY_EDITOR
        UniWebViewPlugin.SetCookie(url, cookie);
#endif
    }