-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
167 lines (142 loc) · 7.34 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
164
165
166
167
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="PostMan-Clone">
<meta name="keywords" content="PostMan-Clone, PostMan, postman, GET request, POST request">
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
<link rel="stylesheet" href="./assets/CSS/style.css">
<title>Postman Clone</title>
</head>
<body>
<div class="loader" id="loader"></div>
<nav class="navbar navbar-light bg-light sticky-top">
<div class="container-fluid">
<div class="navbar-brand">
<img src="./assets/Img/logo.png" alt="logo" width="8%" class="d-inline-block">
Postman Clone
</div>
</div>
</nav>
<div class="p-4">
<div data-alert class="alert alert-danger d-none" role="alert">
JSON data is malformed
</div>
<form data-form>
<div class="input-group mb-4">
<select data-method class="form-select flex-grow-0 w-auto">
<option value="GET" selected>GET</option>
<option value="POST">POST</option>
<option value="PUT">PUT</option>
<option value="PATCH">PATCH</option>
<option value="DELETE">DELETE</option>
</select>
<input data-url class="form-control" type="url" placeholder="https://example.com" required>
<button class="btn btn-primary" type="submit">Send</button>
</div>
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="queryParamsTabs" data-bs-toggle="tab"
data-bs-target="#query-params" type="button" role="tab" aria-controls="query-params"
aria-selected="true">
Query Params
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="requestHeadersTabs" data-bs-toggle="tab"
data-bs-target="#request-headers" type="button" role="tab" aria-controls="request-headers"
aria-selected="false">
Headers
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="jsonTabs" data-bs-toggle="tab" data-bs-target="#json" type="button"
role="tab" aria-controls="json" aria-selected="false">
JSON
</button>
</li>
</ul>
<div class="tab-content p-3 border-top-0 border">
<div class="tab-pane fade show active" id="query-params" role="tabpanel"
aria-labelledby="queryParamsTabs">
<div data-query-params></div>
<button data-add-query-param-btn class="btn btn-outline-success mt-2" type="button">Add</button>
</div>
<div class="tab-pane fade" id="request-headers" role="tabpanel" aria-labelledby="requestHeadersTabs">
<div data-request-headers></div>
<button data-request-header-btn class="btn btn-outline-success mt-2" type="button">Add</button>
</div>
<div class="tab-pane fade" id="json" role="tabpanel" aria-labelledby="jsonTabs">
<!-- <div data-json-request-body class="overflow-auto json-request-body"> -->
<!-- <textarea class="form-control" rows="5"></textarea> -->
<div id="json-input" class="overflow-auto json-request-body" style="height: 300px;"></div>
<!-- </div> -->
</div>
</div>
</form>
<div class="mt-5 d-none" data-response-section>
<h3>Response</h3>
<div class="d-flex my-2">
<div class="me-3">
Status: <span data-status></span>
</div>
<div class="me-3">
Time: <span data-time></span>ms
</div>
<div class="me-3">
Size: <span data-size></span>
</div>
</div>
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="bodyTabs" data-bs-toggle="tab" data-bs-target="#body"
type="button" role="tab" aria-controls="body" aria-selected="true">
Body
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="responseHeadersTabs" data-bs-toggle="tab"
data-bs-target="#response-headers" type="button" role="tab" aria-controls="response-headers"
aria-selected="false">
Headers
</button>
</li>
</ul>
<div class="tab-content p-3 border-top-0 border">
<div class="tab-pane fade show active" id="body" role="tabpanel" aria-labelledby="bodyTabs">
<!-- <div data-json-response-body class="overflow-auto json-response-body">
<div id="jsonResponseEditor"></div>
</div> -->
<div id="json-output" class="overflow-auto json-request-body" style="height: 300px;"></div>
</div>
<div class="tab-pane fade" id="response-headers" role="tabpanel" aria-labelledby="responseHeadersTabs">
<div data-response-headers class="headers-response">
</div>
</div>
</div>
</div>
</div>
<template data-key-value-template>
<div class="input-group my-2" data-key-value-pair>
<input type="text" data-key class="form-control" placeholder="Key">
<input type="text" data-value class="form-control" placeholder="Value">
<button class="btn btn-outline-danger" data-remove-btn type="button">Remove</button>
</div>
</template>
<script type="module" src="./assets/JS/script.js"></script>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm"
crossorigin="anonymous"></script>
<!-- Axios -->
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/9.5.6/jsoneditor.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.12/ace.js"
integrity="sha512-GZ1RIgZaSc8rnco/8CXfRdCpDxRCphenIiZ2ztLy3XQfS2KzB9dCm5KRMb2JZ2PPlDZC8SHNJKLZ7oGqYrW7bw=="
crossorigin="anonymous"></script>
</body>
</html>