-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
174 lines (160 loc) · 9.97 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
168
169
170
171
172
173
174
<!DOCTYPE html>
<html lang="en" ng-app="App">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>RESTful API Client</title>
<meta name="generator" content="Weblantropia.com" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="Weblantropia.com - Angularjs based Restful API client." />
<meta name="author" content="Federico Guzman | http://about.me/federicoguzman">
<meta name="robots" content="noodp"/>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="http://www.weblantropia.com">Weblantropia</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#about">About</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<div class="container" ng-controller="apiclient">
<!-- API Client -->
<div class="row">
<div class="panel panel-info">
<div class="panel-heading">
<h3>RESTful Client</h3>
</div>
</div>
</div>
<!-- /.row -->
<!-- Terminal -->
<div class="row">
<div class="panel panel-default request-block">
<div class="panel-heading">
<a id="request-toggle" href="javascript:void(0);"><h4><span>[-]</span> Request</h4></a>
</div>
<div class="panel-body">
<form id="form-create-collection" role="form" name="form-create-collection" ng-submit="apiRequest()">
<div class="row">
<div class="col-lg-12">
<div class="col-md-2">
<div class="form-group">
<label class="sr-only" for="request-method">Method</label>
<div class="input-group">
<div class="input-group-addon">Method</div>
<select class="form-control" id="request-method" ng-model="request.method">
<option ng-repeat="option in methods" value="{{option}}">{{option}}</option>
</select>
</div>
</div>
</div>
<div class="col-md-8">
<div class="form-group">
<label class="sr-only" for="request-endpoint">Endpoint</label>
<div class="input-group">
<div class="input-group-addon">Endpoint</div>
<input type="text" class="form-control" id="request-endpoint" placeholder="" ng-model="request.endpoint">
</div>
</div>
</div>
<div class="col-md-2">
<button type="submit" class="btn btn-success"><i class="fa fa-paper-plane" aria-hidden="true"></i> SEND</button>
</div>
</div>
</div>
<!-- /.row -->
<div class="row">
<div class="col-lg-8" id="header-params-holder">
<label>Headers</label>
<div class="form-group" ng-repeat="header in headers">
<div class="col-md-4">
<div class="input-group">
<input type="text" class="form-control header-param" placeholder="Param" ng-model="header.param">
<div class="input-group-addon">:</div>
</div>
</div>
<div class="col-md-6">
<input type="text" class="form-control header-value" placeholder="Value" ng-model="header.value">
</div>
<div class="col-md-1">
<button type="button" class="btn btn-danger btn-sm" ng-click="removeParam(headers, $index)"><i class="fa fa-close" aria-hidden="true"></i></button>
</div>
</div>
</div>
</div>
<!-- /.row -->
<div class="col-lg-12 vert-offset-top-1">
<button type="button" class="btn btn-primary add-param" ng-click="addParam(headers,{param:'', value: ''})">+ Add Header</button>
</div>
<div class="row vert-offset-top-5">
<div class="col-lg-12">
<label>Body</label>
<div class="form-group">
<textarea class="form-control" placeholder="Request Body" id="request-body" ng-model="request.body"></textarea>
</div>
</div>
</div>
<!-- /.row -->
</form>
</div>
</div>
</div>
<!-- /.row -->
<div class="row">
<div class="panel panel-default response-block">
<div class="panel-heading">
<a id="response-toggle" href="javascript:void(0);"><h4><span>[-]</span> Response</h4></a>
</div>
<div class="panel-body">
<div>
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation"><a href="#response-headers" aria-controls="headers" role="tab" data-toggle="tab">Response Headers</a></li>
<li role="presentation"><a href="#response-raw" aria-controls="raw" role="tab" data-toggle="tab">Response Body (Raw)</a></li>
<li role="presentation" class="active"><a href="#response-highlight" aria-controls="highlight" role="tab" data-toggle="tab">Response Body (Highlight)</a></li>
<li role="presentation"><a href="#response-preview" aria-controls="preview" role="tab" data-toggle="tab">Response Body (Preview)</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane" id="response-headers"><pre class="prettyprint linenums"><code class="language-html">{{response.headers}}</code></pre></div>
<div role="tabpanel" class="tab-pane" id="response-raw"><pre class="prettyprint"><code class="language-html">{{response.body}}</code></pre></div>
<div role="tabpanel" class="tab-pane active" id="response-highlight"><pre class="brush: js"><code ng-bind-html="response.beauty"></code></pre></div>
<div role="tabpanel" class="tab-pane pre prettyprint" id="response-preview">
<textarea class="prettyprint response-preview">{{response.preview}}</textarea>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /.row -->
</div>
<!-- /.container -->
<script type='text/javascript' src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type='text/javascript' src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<script type='text/javascript' src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>
<script type='text/javascript' src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular-sanitize.js"></script>
<script type="text/javascript" src="js/app.js"></script>
</body>
</html>