Created
June 26, 2018 17:35
-
-
Save wertyoo/6237bbbee3274426029d74929927c9c8 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/sasoxif/1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<script src="https://code.jquery.com/jquery-3.0.0.js"></script> | |
</head> | |
<body> | |
<p>helo</p> | |
<script id="jsbin-javascript"> | |
console.log("starting"); | |
$.ajax({ | |
url : 'https://mocksvc.mulesoft.com/mocks/aa86ec49-2492-4b6d-aea6-7e7d7f51137b/ad-request', | |
type : 'GET', | |
headers: { | |
client_id: 'oop', | |
client_secret: 'ie' | |
}, | |
data : { | |
'start' : 10, | |
'device_id': '010-018181', | |
'width': '1400', | |
'height': '400', | |
'latitude': '5', | |
'longitude': '5' | |
}, | |
success: function(data) { | |
console.log('Data: '+data); | |
console.log('POP URL: '); | |
var path = "//item/proof_of_play_url"; | |
var nodes; | |
if (data.evaluate) { | |
nodes = data.evaluate(path, data, null, XPathResult.ANY_TYPE, null); | |
console.log(nodes.iterateNext().childNodes[0].nodeValue) | |
// Code For Internet Explorer | |
} | |
}, | |
error : function(request,error) { | |
console.log("Request: "+JSON.stringify(request)); | |
} | |
}); | |
</script> | |
<script id="jsbin-source-html" type="text/html"> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<script src="https://code.jquery.com/jquery-3.0.0.js"><\/script> | |
</head> | |
<body> | |
<p>helo</p> | |
</body> | |
</html></script> | |
<script id="jsbin-source-javascript" type="text/javascript"> | |
console.log("starting"); | |
$.ajax({ | |
url : 'https://mocksvc.mulesoft.com/mocks/aa86ec49-2492-4b6d-aea6-7e7d7f51137b/ad-request', | |
type : 'GET', | |
headers: { | |
client_id: 'oop', | |
client_secret: 'ie' | |
}, | |
data : { | |
'start' : 10, | |
'device_id': '010-018181', | |
'width': '1400', | |
'height': '400', | |
'latitude': '5', | |
'longitude': '5' | |
}, | |
success: function(data) { | |
console.log('Data: '+data); | |
console.log('POP URL: '); | |
var path = "//item/proof_of_play_url"; | |
var nodes; | |
if (data.evaluate) { | |
nodes = data.evaluate(path, data, null, XPathResult.ANY_TYPE, null); | |
console.log(nodes.iterateNext().childNodes[0].nodeValue) | |
// Code For Internet Explorer | |
} | |
}, | |
error : function(request,error) { | |
console.log("Request: "+JSON.stringify(request)); | |
} | |
});</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("starting"); | |
$.ajax({ | |
url : 'https://mocksvc.mulesoft.com/mocks/aa86ec49-2492-4b6d-aea6-7e7d7f51137b/ad-request', | |
type : 'GET', | |
headers: { | |
client_id: 'oop', | |
client_secret: 'ie' | |
}, | |
data : { | |
'start' : 10, | |
'device_id': '010-018181', | |
'width': '1400', | |
'height': '400', | |
'latitude': '5', | |
'longitude': '5' | |
}, | |
success: function(data) { | |
console.log('Data: '+data); | |
console.log('POP URL: '); | |
var path = "//item/proof_of_play_url"; | |
var nodes; | |
if (data.evaluate) { | |
nodes = data.evaluate(path, data, null, XPathResult.ANY_TYPE, null); | |
console.log(nodes.iterateNext().childNodes[0].nodeValue) | |
// Code For Internet Explorer | |
} | |
}, | |
error : function(request,error) { | |
console.log("Request: "+JSON.stringify(request)); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment