-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
93 lines (90 loc) · 5.48 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
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="api.css">
<title>API test tool</title>
<script src="api_tester.js" type="text/javascript"></script>
</head>
<body>
<section>
<article>
<p> This tool is designed to allow a user to test different facets of an api. Especially made for RESTful api testing. This will let you
send data with any method to a URI. </p>
</article>
<article>
<form id="testForm" action="" method="GET">
<div class="form-group row">
<label class="col-sm-2 col-form-label" for="methodReq">Method: </label>
<div class="col-sm-10">
<select class="form-control" id="methodReq" name="methodReq">
<option value="GET">GET</option>
<option value="POST">POST</option>
<option value="PATCH">PATCH</option>
<option value="PUT">PUT</option>
<option value="DELETE">DELETE</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label" for="requestHeaderType">Request Header Type:</label>
<div class="col-sm-10">
<select class="form-control" id="requestHeaderType" name="requestHeaderType">
<option value="application/json">application/json</option>
<option value="application/x-www-form-urlencoded">application/x-www-form-urlencoded</option>
<option value="application/xml">application/xml</option>
<option value="multipart/form-data">multipart/form-data</option>
</select>
</div>
</div>
<p>Other Header:</p>
<div class="form-group row">
<div class="col">
<label class="col-form-label" for="CHeaderName">Name:</label>
<input class="form-control" id="CHeaderName" name="CHeaderName" placeholder="Custom Header Name"></input>
</div>
<div class="col">
<label class="col-form-label" for="CHeaderData">Data:</label>
<input class="form-control" id="CHeaderData" name="CHeaderData" placeholder="Custom Header Data (if needed)"></input>
</div>
<button class="btn btn-primary" id="btnAddHeader" onclick="addHeader(); return false;">Add Header</button>
</div>
<div class="form-group row">
<div class="col">
<select class="form-control" id="CHeaders" name="CHeaders" size="4"></select>
</div>
<div class="col-md-2">
<button class="btn btn-primary" id="btnRemoveHeader" onclick="removeHeader(); return false;">Remove Header</button>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label" for="actiontext">Action:</label>
<div class="col-sm-10">
<input class="form-control col-sm-10" id="actiontext" name="actiontext"></input>
</div>
</div>
<div id="requestFormArea" class="form-group row">
<label class="col-sm-2 col-form-label" for="request">Request:</label>
<div class="col-sm-10">
<textarea class="form-control col-sm-10" id="request" name="request"></textarea>
</div>
</div> <!--requestFormArea-->
<div class="form-group row">
<div class="form-group col-sm-10">
<input type="submit" class="btn btn-primary" id="submit" value="Send Request" onclick="sendIt(); return false;"></input>
</div>
</div>
</form>
</article>
<article>
<input id="resultCode" class="form-control" placeholder="response codes will appear here" readonly></input>
<textarea id="resultHeader" class="form-control" placeholder="response header will appear here" readonly></textarea>
<textarea id="results" class="form-control" placeholder="Results will appear here" readonly></textarea>
</article>
</section>
</body>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
</html>