HttpConnection not working on some URLs?
Here's a question: I tried the below code on the 3 URLs which are inside the code, and it only works on the putsreq site. Is this true for others, and why?
#target bridge
function test(){
if ( !ExternalObject.webaccesslib )
ExternalObject.webaccesslib = new ExternalObject('lib:webaccesslib');
var response = null;
var responseHeaders = null;
// var http = new HttpConnection('https://requestb.in/sfeof5sf') ; // not working
// var http = new HttpConnection('https://jsonplaceholder.typicode.com/posts/1') ; // not working
var http = new HttpConnection("http://putsreq.com/85Np9n50u2q2E48HBaiI"); // working
http.timeout = 22;
http.execute() ;
response = http.response;
$.write(response);
};
test();
