mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/2272@1993 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
		
			
				
	
	
		
			27 lines
		
	
	
		
			749 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			749 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
<html>
 | 
						|
<body bgcolor="white">
 | 
						|
<script language="JavaScript">
 | 
						|
function execXMLHttpRequest()
 | 
						|
{
 | 
						|
  xhr = new XMLHttpRequest();
 | 
						|
  xhr.open("GET", document.getElementById("url").value, true);
 | 
						|
  xhr.setRequestHeader('My-Custom-Header', 'Some Value');
 | 
						|
  xhr.onload = function(e) {
 | 
						|
    if (xhr.readyState === 4) {
 | 
						|
      var value = "Status Code: "+xhr.status;
 | 
						|
      if (xhr.status === 200)
 | 
						|
        value += "\n\n"+xhr.responseText;
 | 
						|
      document.getElementById('ta').value = value;
 | 
						|
    }
 | 
						|
  }
 | 
						|
  xhr.send();
 | 
						|
}
 | 
						|
</script>
 | 
						|
<form>
 | 
						|
URL: <input type="text" id="url" value="http://tests/request">
 | 
						|
<br/><input type="button" onclick="execXMLHttpRequest();" value="Execute XMLHttpRequest">
 | 
						|
<br/><textarea rows="10" cols="40" id="ta"></textarea>
 | 
						|
</form>
 | 
						|
</body>
 | 
						|
</html>
 |