示例#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>
 /// 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>
 /// <param name="skipEncoding">
 /// Whether UniWebView should skip encoding the url or not. If set to `false`, UniWebView will try to encode the url parameter before
 /// using it. Otherwise, your original url string will be used to set the cookie if it is valid. Default is `false`.
 /// </param>
 public static void SetCookie(string url, string cookie, bool skipEncoding = false)
 {
     UniWebViewInterface.SetCookie(url, cookie, skipEncoding);
 }