public async Task <IHttpClientContainer> LevelManagement(string gameId) { //http://demo.en.cx/Administration/Games/LevelManager.aspx?gid=25186 string url = "http://demo.en.cx/Administration/Games/LevelManager.aspx" + "?gid=" + gameId + ""; HttpWebRequest req = this.SetupRequest(url, "GET"); var httpClient = new HttpClientDecorator(req, this.UseGzipEncoding); await httpClient.GetHttpResponse(); string response = httpClient.GetResponseString(); int responseCode = (int)httpClient.Response.StatusCode; return(httpClient); }
public async Task <IHttpClientContainer> LoginPost(string password, string username) { string url = this.AppUrl + "Login.aspx" + "?return=/Default.aspx"; var req = this.SetupRequest(url, "POST"); req.Headers["Origin"] = "http://demo.en.cx"; req.ContentType = "application/x-www-form-urlencoded"; IHttpClientDecorator httpClient = new HttpClientDecorator(req, this.UseGzipEncoding); string postData = "ddlNetwork=1&EnButton1=Р’С…РѕРґ&socialAssign=0&Login="******"&Password="******""; await httpClient.SendHttpRequest(postData); await httpClient.GetHttpResponse(); string response = httpClient.GetResponseString(); int responseCode = (int)httpClient.Response.StatusCode; return(httpClient); }