-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
151 lines (126 loc) · 5.84 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
<!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 href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="prism.css">
<style>
#responsePre {
max-height: 500px;
}
</style>
<title>Hello, world!</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="#">Navbar</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>
</ul>
<form class="d-flex">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success" type="submit">Search</button>
</form>
</div>
</div>
</nav>
<div class="container">
<h1 class="my-3">Welcome to PostMaster</h1>
<!-- url box -->
<div class="my-3 row">
<label for="url" class="col-sm-2 col-form-label">URL</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="url" placeholder="Enter URL here...">
</div>
</div>
<div class="row my-3">
<legend class="col-form-label col-sm-2 pt-0">Request Type</legend>
<div class="col-sm-10">
<div class="form-check">
<input class="form-check-input" type="radio" name="requestType" id="get" value="GET" checked>
<label class="form-check-label" for="get">
GET
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="requestType" id="post" value="POST">
<label class="form-check-label" for="post">
POST
</label>
</div>
</div>
</div>
<div class="row my-3">
<legend class="col-form-label col-sm-2 pt-0">Content Type</legend>
<div class="col-sm-10">
<div class="form-check">
<input class="form-check-input" type="radio" name="contentType" id="json" value="JSON" checked>
<label class="form-check-label" for="json">
JSON
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="contentType" id="params" value="params">
<label class="form-check-label" for="params">
Custon Parameters
</label>
</div>
</div>
</div>
<!-- Parameters box - this will hide on clicking json option in content type -->
<div id="parametersBox" class="my-3">
<div class="row g-3">
<label class="col-form-label col-sm-2 pt-0">Parameter 1</label>
<div class="col">
<input type="text" class="form-control" id="parameterKey1" placeholder="Enter Parameter 1 Key">
</div>
<div class="col">
<input type="text" class="form-control" id="parameterValue1" placeholder="Enter Parameter 1 Value">
</div>
<div class="col">
<button class="btn btn-primary" id="addParam">+</button>
</div>
</div>
<div id="newParameters"></div>
</div>
<!-- JSONRequest box - this will hide on clicking parameters option in content type -->
<div class="my-3 row" id="requestJsonBox">
<label for="RequestJSON" class="col-sm-2 col-form-label">Request JSON</label>
<div class="col-sm-10 col-form-label">
<textarea class="form-control col" id="requestJsonText" rows="4"
placeholder="Enter Request JSON..."></textarea>
</div>
</div>
<!-- submit button which will trigger fetch api -->
<div class="my-3">
<button id="submit" class="btn btn-primary">Submit</button>
</div>
<div class="my-3 row">
<label for="Response" class="col-sm-2 col-form-label">Response</label>
<div class="col-sm-10">
<!-- <textarea class="form-control col" id="responseJsonText"
rows="4">Your Response will Appear here...</textarea> -->
<pre id="responsePre" class="language-javascript"><code id="responsePrism" class="language-javascript"></code></pre>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
<script src="index.js"></script>
<script src="prism.js"></script>
</body>
</html>