public static string GetCookie(string url, string key) { #if UNITY_IOS || UNITY_ANDROID || UNITY_EDITOR return(UniWebViewPlugin.GetCookie(url, key)); #else return(""); #endif }
/// <summary> /// Gets the cookie value under a url and key. /// </summary> /// <param name="url"></param> /// <param name="key"></param> /// <returns></returns> public string GetCookie(string url, string key) { Setup(); #if UNIWEBVIEW3_SUPPORTED return(UniWebViewInterface.GetCookie(url, key, false)); #elif UNIWEBVIEW2_SUPPORTED return(UniWebViewPlugin.GetCookie(url, key)); #else return(WWebViewPlugin.GetCookie(url, key)); #endif }
/// <summary> /// Get a cookie value from the given URL and key. /// </summary> /// <param name="url">The URL for which the cookies are requested.</param> /// <param name="key">The key you need for the value.</param> /// <returns> /// The corresponding cookie value of the input key for the url. /// If there is no such url or key in cookie storage, an empty string will be returned. /// </returns> public static string GetCookie(string url, string key) { return(UniWebViewPlugin.GetCookie(url, key)); }