protected GetSessionResponseModel Get_Session_Implementation() { string useragent = HttpContext.Current.Request.UserAgent; HttpBrowserCapabilities browser = new HttpBrowserCapabilities { Capabilities = new Hashtable { { string.Empty, useragent } } }; BrowserCapabilitiesFactory factory = new BrowserCapabilitiesFactory(); factory.ConfigureBrowserCapabilities(new NameValueCollection(), browser); GetSessionRequestModel request = new GetSessionRequestModel() { Type = 1, Connection = new JsonConnection() { IP = Config.IP, Port = Config.Port }, Browser = new JsonBrowser() { Name = browser.Browser, Version = browser.Version } }; HttpPostAgent <GetSessionRequestModel, GetSessionResponseModel> agent = new HttpPostAgent <GetSessionRequestModel, GetSessionResponseModel>(); agent.Url = Config.Get_Session; agent.Body = request; return(agent.Send()); }
protected GetBusJourneysResponseModel Get_Bus_Journeys_Implementation(GetBusJourneysRequestModel request) { HttpPostAgent <GetBusJourneysRequestModel, GetBusJourneysResponseModel> agent = new HttpPostAgent <GetBusJourneysRequestModel, GetBusJourneysResponseModel>(); agent.Url = Config.Get_Bus_Journeys; agent.Body = request; return(agent.Send()); }