public void RecvOperation() { setProcessing(true); GETContent emptyGet = new GETContent(); var req = HttpHelper.CreateHttpGetRequest(serverAddress + "operation", emptyGet); req.ResponseReceived += new HttpRequest.ResponseHandler(req_ResponseReceived_Operation); req.SendRequest(); Debug.Print("[CLIENT] " + serverAddress + "operation"); }
public static void GetWeatherData(string location) { GETContent getContent = new GETContent(); // xml.weather.yahoo.com/ , https://weather.yahooapis.com/forecastrss?w=2502265 HttpRequest getRequest = HttpHelper.CreateHttpGetRequest("https://xml.weather.yahoo.com/forecastrss?w=2502265", getContent); //HttpRequest getRequest = HttpHelper.CreateHttpGetRequest("https://www.google.com/ig/api?weather=london" + location, getContent); getRequest.ResponseReceived += getRequest_ResponseReceived; getRequest.SendRequest(); }
private void timer_checkSchedule(GT.Timer timer) { if (!NETWORK_UP) { Debug.Print("Network down... unable to read data from server."); return; } if (!TIME_SYNCHRONIZED) { Debug.Print("Attempt B2 - Synchronizing Time Reference...."); GETContent get = new GETContent(); String pathB = httpPath + "SmartService.svc/web/Time/"; var reqB = HttpHelper.CreateHttpGetRequest(pathB, get); Debug.Print("HTTP request to server: " + pathB); reqB.ResponseReceived += new HttpRequest.ResponseHandler(req_ResponseReceived); reqB.ResponseReceived += new HttpRequest.ResponseHandler(Synchronize_Time); reqB.SendRequest(); } }