REST-API Test mit Jquery Client
This commit is contained in:
43
web/index.html
Normal file
43
web/index.html
Normal file
@ -0,0 +1,43 @@
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="Ordner"></div>
|
||||
|
||||
|
||||
<script src="/misc/jquery.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var ServerAPI="http://127.0.0.1:8000";
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
contentType:'application/json; charset=utf-8',
|
||||
url: ServerAPI+'/folder/2019-11-15',
|
||||
dataType: "json",
|
||||
data: "",
|
||||
success: function(content){
|
||||
|
||||
//http://127.0.0.1:8000/img/2019-11-15/IMG_4186.JPG
|
||||
for ( var i = 0, l = content.length; i < l; i++ ) {
|
||||
var ObjInhalt = content[i];
|
||||
$("#Ordner").append("<li>"+
|
||||
"<img src=\""+ServerAPI+"/img/2019-11-15/"+ObjInhalt+"\" width=100 height=100>"+
|
||||
"<a href=\"#\" onclick=\"ShowFolder('"+ObjInhalt+"')\">"+
|
||||
ObjInhalt+"</a></li>");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
6
web/misc/jquery.min.js
vendored
Normal file
6
web/misc/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user