Iam trying to push some data to my web service in which i use http GET to take the data. I need a way to just call the url frok my imp http.get does not work at all it is not able to call the url. The web service is working fine as i checked it by calling from a browser.
server.log(a);
data = a;
server.log(data.time);
local headers = {"Content-Type" : "text/json"};
server.log("post...");
local url = "http://armor.co.in/vignesh/report/requestData.php?currentDate=2014-11-24 16:42:46&macAddress=952555";
local request = http.get(url,headers);
local response = request.sendsync();
Space characters in URLs are normally either “URL-encoded” as “%20”, or sent as “+” characters, but your URL has a real space character in it.
Also, does your web service want HTTP GET or POST? If you’re setting a content-type, then that implies there’s an outbound body, which implies that it should be a POST not a GET.