-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
163 lines (148 loc) · 6.81 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="prism.css">
<link rel="stylesheet" href="index.css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
<title>Fetch</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Fetch</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About Us</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contact Us</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container" style="width:90%;">
<h2 class="my-3">Welcome to Fetch</h2>
<form action="" class="needs-validation" novalidate>
<div class="mb-3 row">
<label for="url" class="col-sm-2 col-form-label">URL</label>
<div class="col-sm-10 isvalid">
<input type="text" class="form-control " aria-describedby="validationServer03Feedback" required
id="url" style="width:100%;">
<div id="validationServer03Feedback" class="invalid-feedback">
Please enter url.
</div>
</div>
</div>
</form>
<!-- Radio buttons GET & POST-->
<div class="mb-3 row">
<label for="requestType" class="col-sm-2 col-form-label">Request Type</label>
<div class="col-sm-10">
<div class="form-check mt-2">
<input class="form-check-input" type="radio" value="GET" id="getRadio" name="requestType" checked>
<label class="form-check-label " for="requestType">
GET
</label>
</div>
<div class="form-check mt-2">
<input class="form-check-input" type="radio" value="POST" id="postRadio" name="requestType">
<label class="form-check-label" for="requestType">
POST
</label>
</div>
</div>
</div>
<!-- Radio buttons json & parameter-->
<div class="mb-3 row">
<label for="contentType" class="col-sm-2 col-form-label">Content Type</label>
<div class="col-sm-10">
<div class="form-check mt-2">
<input class="form-check-input" type="radio" value="JSON" id="jsonRadio" name="contentType" checked>
<label class="form-check-label " for="checkJson">
JSON
</label>
</div>
<div class="form-check mt-2">
<input class="form-check-input" type="radio" value="customParameter" id="paramRadio"
name="contentType">
<label class="form-check-label" for="checkParm">
Custom Parameters
</label>
</div>
</div>
</div>
<!-- add parameter -->
<div id="paramBox">
<div class="mb-3 row ">
<!-- parameters -->
<label for="inputParam" class="col-sm-2 col-form-label mt-1">Parameter 1</label>
<div class="col-sm-4 mt-1">
<input type="text" class="form-control" placeholder="Parameter 1 key" aria-label="City"
id="paramKey1">
</div>
<div class="col-md-4 mt-1">
<input type="text" class="form-control" placeholder="Parameter 1 value" aria-label="State"
id="paramValue1">
</div>
<div class="col mt-1">
<button type="submit" class="btn btn-primary" id="addParam" aria-label="">+</button>
</div>
</div>
</div>
<!-- text area 1 -->
<div id="jsonBox">
<div class="mb-3 row">
<!-- text area -->
<label for="textArea1" class="col-sm-2 col-form-label mt-3">Enter request JSON</label>
<div class="form-floating col-sm-10 mt-3">
<div class="mb-3">
<textarea class="form-control" id="jsonTextArea" placeholder="Type here..."
style="height: 100px"></textarea>
</div>
</div>
</div>
</div>
<!-- submit button -->
<div class="mx-auto mb-5 mt-5" style="width: 80px;">
<button type="button" class="btn btn-primary" id="submitBtn" style="width: 80px;">Submit</button>
</div>
<hr>
<!-- text area 2 -->
<div class="mb-3 row mt-5">
<!-- text area -->
<label for="textArea1" class="col-sm-2 col-form-label mt-3">Response</label>
<div class="form-floating col-sm-10 mt-3 mb-3">
<div class="mb-3">
<!-- <textarea class="form-control" id="responseTextArea" placeholder="Response will show here" style="height: 100px"></textarea> -->
<pre id="responsePre" class="language-javascript">
<code id="responseTextArea" class="language-javascript">
your response will show here
</code>
</pre>
</div>
</div>
</div>
</div>
<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ"
crossorigin="anonymous"></script>
<script src="app/app.js"></script>
<script src="app/prism.js"></script>
</body>
</html>