update to current version
all initial features implemented tbd: etrack front
This commit is contained in:
		
							
								
								
									
										38
									
								
								target/classes/static/js/main.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								target/classes/static/js/main.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
|  | ||||
| function httpGet() | ||||
| { | ||||
|   var clientUUID = document.getElementById("getClientUUID").value; | ||||
|    var mockedResponseId = document.getElementById("getMockedResponseId").value; | ||||
|    var url = "http://localhost:8097/klaus/v1/get/" + clientUUID + "/" + mockedResponseId; | ||||
|     var xmlHttp = new XMLHttpRequest(); | ||||
|     xmlHttp.open( "GET", url, false ); // false for synchronous request | ||||
|     xmlHttp.send( null ); | ||||
|  | ||||
|     var container = document.getElementById("getMockedResponse"); | ||||
|     var headers = xmlHttp.getAllResponseHeaders(); | ||||
|     container.appendChild(document.createTextNode(headers)); | ||||
|     container.appendChild(document.createTextNode("Your message: ")); | ||||
|     container.appendChild(document.createElement("br")); | ||||
|     container.appendChild(document.createTextNode((xmlHttp.responseText))); | ||||
|     return xmlHttp.responseText; | ||||
|  | ||||
| } | ||||
|  | ||||
|         var numberOfHeaders = 0; | ||||
|             function addFields(){ | ||||
|             var container = document.getElementById("headers"); | ||||
|  | ||||
|                 numberOfHeaders++; | ||||
|                 container.appendChild(document.createElement("br")); | ||||
|                 container.appendChild(document.createTextNode("Header " + (numberOfHeaders))); | ||||
|                 var headerInput = document.createElement("input"); | ||||
|                 headerInput.type = "text"; | ||||
|                 headerInput.name = "header"; | ||||
|                 container.appendChild(headerInput); | ||||
|  | ||||
|                 container.appendChild(document.createTextNode("Value " + (numberOfHeaders))); | ||||
|                 var valueInput = document.createElement("input"); | ||||
|                 valueInput.type = "text"; | ||||
|                 valueInput.name = "value"; | ||||
|                 container.appendChild(valueInput); | ||||
|         } | ||||
		Reference in New Issue
	
	Block a user
	 Szakalakamaka
					Szakalakamaka