-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
65 lines (65 loc) · 3.23 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Nathaniel Rink - JS Axios Demo</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="./node_modules/bootstrap/dist/css/bootstrap.css">
</head>
<body>
<div class="container">
<div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<strong><a href="http://codingthesmartway.com/courses/complete-javascript/" target="_blank">[ONLINE COURSE] - The Complete JavaScript Course: Build a Real-World Project</a></strong> +++ Master JavaScript with the most complete JavaScript course on the market! Includes projects, challenges, final exam, ES6 +++ You will gain a deep and true understanding of how JavaScript works behind the scenes. +++
</div>
<h1>JS Axios Demo <small>by CodingTheSmartWay.com</small></h1>
<div class="jumbotron">
<h1>Welcome To Axios</h1>
<h4>This applications uses Axios. Axios is a Promise-based HTTP client for JavaScript which can be used in your front-end application and in your Node.js backend. </h4>
</div>
<div class="panel panel-primary">
<div class="panel-heading">GET Request</div>
<div class="panel-body">
<button class="btn btn-primary axiosGetRequest">Get Todos (axios)</button>
<button class="btn btn-primary javascriptRequest1">Get Todos (JS)</button>
<button class="btn btn-primary performAxiosGetError">Get error (axios)</button>
<button class="btn btn-primary performJSGetError">Get error (JS)</button>
<button class="btn btn-warning clearOutput">Clear</button>
<div class="panel-body" id="getResult1"></div>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">GET Request with Paramaters</div>
<div class="panel-body">
<input type="text" class="form-control" id="todoId" placeholder="Todo ID ..."/><br/>
<button class="btn btn-primary axiosGetRequestWParam">Get Todos</button>
<button class="btn btn-warning clearOutput">Clear</button>
<div class="panel-body" id="getResult2"></div>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">POST Request</div>
<div class="panel-body">
<form class="form-inline" id="todoInputForm">
<div class="form-group">
<input type="text" class="form-control" id="todoTitle" placeholder="Todo Title ...">
</div>
<button type="submit" class="btn btn-primary axiosPostRequest">Send</button>
</form><br/>
<button class="btn btn-warning clearOutput">Clear</button>
<div class="panel-body" id="postResult"></div>
</div>
</div>
<div class="footer">
<p>© <a href="http://codingthesmartway.com" target="_blank">CodingTheSmartWay.com</a> | <a href="http://codingthesmartway.com/imprint" target="_blank">Imprint</a></p>
</div>
</div>
<script src="./node_modules/axios/dist/axios.min.js"></script>
<script src="./node_modules/jquery/dist/jquery.min.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="./node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="module" src="scripts/main.js"></script>
</body>
</html>