private void GetAuthCookiesComplete(HttpWebRequest request, HttpWebResponse response, String jsonData, Exception error) { if (error != null) { OnError(error); return; } GoogleHTTP.SetCookieData(request.CookieContainer, response.Cookies); if (OnLoginComplete != null) { OnLoginComplete(this, EventArgs.Empty); } }
public API() { client = new GoogleHTTP(); trackContainer = new List <GoogleMusicSong>(); }
public API() { client = new GoogleHTTP(); trackContainer = new List<GoogleMusicSong>(); }
public override HttpWebRequest SetupRequest(Uri address) { if (address.ToString().StartsWith("https://play.google.com/music/services/")) { address = new Uri(address.OriginalString + String.Format("?u=0&xt={0}", GoogleHTTP.GetCookieValue("xt"))); } HttpWebRequest request = base.SetupRequest(address); request.CookieContainer = AuthorizationCookieCont; if (AuthroizationToken != null) { request.Headers[HttpRequestHeader.Authorization] = String.Format("GoogleLogin auth={0}", AuthroizationToken); } return(request); }