documentation: add JS api docs
[project/luci.git] / documentation / jsapi / LuCI.Headers.html
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="utf-8">
5 <title>JSDoc: Class: Headers</title>
6
7 <script src="scripts/prettify/prettify.js"> </script>
8 <script src="scripts/prettify/lang-css.js"> </script>
9 <!--[if lt IE 9]>
10 <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11 <![endif]-->
12 <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13 <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
14 </head>
15
16 <body>
17
18 <div id="main">
19
20 <h1 class="page-title">Class: Headers</h1>
21
22
23
24
25
26
27 <section>
28
29 <header>
30
31 <h2><span class="attribs"><span class="type-signature"></span></span>
32 <span class="ancestors"><a href="LuCI.html">LuCI</a>.</span>Headers</h2>
33
34 <div class="class-description"><p>The <code>Headers</code> class is an internal utility class exposed in HTTP
35 response objects using the <code>response.headers</code> property.</p></div>
36
37
38 </header>
39
40 <article>
41 <div class="container-overview">
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59 <dl class="details">
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 <dt class="tag-source">Source:</dt>
87 <dd class="tag-source"><ul class="dummy"><li>
88 <a href="luci.js.html">luci.js</a>, <a href="luci.js.html#line324">line 324</a>
89 </li></ul></dd>
90
91
92
93
94
95
96
97 </dl>
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119 </div>
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136 <h3 class="subsection-title">Methods</h3>
137
138
139
140
141
142
143
144 <h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">(name)</span><span class="type-signature"> &rarr; {string|null}</span></h4>
145
146
147
148
149
150
151 <div class="description">
152 <p>Returns the value of the given header name.
153 Note: Header-Names are case-insensitive.</p>
154 </div>
155
156
157
158
159
160
161
162
163
164 <h5>Parameters:</h5>
165
166
167 <table class="params">
168 <thead>
169 <tr>
170
171 <th>Name</th>
172
173
174 <th>Type</th>
175
176
177
178
179
180 <th class="last">Description</th>
181 </tr>
182 </thead>
183
184 <tbody>
185
186
187 <tr>
188
189 <td class="name"><code>name</code></td>
190
191
192 <td class="type">
193
194
195 <span class="param-type">string</span>
196
197
198
199 </td>
200
201
202
203
204
205 <td class="description last"><p>The header name to read</p></td>
206 </tr>
207
208
209 </tbody>
210 </table>
211
212
213
214
215
216
217 <dl class="details">
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244 <dt class="tag-source">Source:</dt>
245 <dd class="tag-source"><ul class="dummy"><li>
246 <a href="luci.js.html">luci.js</a>, <a href="luci.js.html#line363">line 363</a>
247 </li></ul></dd>
248
249
250
251
252
253
254
255 </dl>
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271 <h5>Returns:</h5>
272
273
274 <div class="param-desc">
275 <p>The value of the given header name or <code>null</code> if the header isn't present.</p>
276 </div>
277
278
279
280 <dl>
281 <dt>
282 Type
283 </dt>
284 <dd>
285
286 <span class="param-type">string</span>
287 |
288
289 <span class="param-type">null</span>
290
291
292 </dd>
293 </dl>
294
295
296
297
298
299
300
301
302
303
304
305
306
307 <h4 class="name" id="has"><span class="type-signature"></span>has<span class="signature">(name)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
308
309
310
311
312
313
314 <div class="description">
315 <p>Checks whether the given header name is present.
316 Note: Header-Names are case-insensitive.</p>
317 </div>
318
319
320
321
322
323
324
325
326
327 <h5>Parameters:</h5>
328
329
330 <table class="params">
331 <thead>
332 <tr>
333
334 <th>Name</th>
335
336
337 <th>Type</th>
338
339
340
341
342
343 <th class="last">Description</th>
344 </tr>
345 </thead>
346
347 <tbody>
348
349
350 <tr>
351
352 <td class="name"><code>name</code></td>
353
354
355 <td class="type">
356
357
358 <span class="param-type">string</span>
359
360
361
362 </td>
363
364
365
366
367
368 <td class="description last"><p>The header name to check</p></td>
369 </tr>
370
371
372 </tbody>
373 </table>
374
375
376
377
378
379
380 <dl class="details">
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407 <dt class="tag-source">Source:</dt>
408 <dd class="tag-source"><ul class="dummy"><li>
409 <a href="luci.js.html">luci.js</a>, <a href="luci.js.html#line347">line 347</a>
410 </li></ul></dd>
411
412
413
414
415
416
417
418 </dl>
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434 <h5>Returns:</h5>
435
436
437 <div class="param-desc">
438 <p>Returns <code>true</code> if the header name is present, <code>false</code> otherwise</p>
439 </div>
440
441
442
443 <dl>
444 <dt>
445 Type
446 </dt>
447 <dd>
448
449 <span class="param-type">boolean</span>
450
451
452 </dd>
453 </dl>
454
455
456
457
458
459
460
461
462
463
464
465
466
467 </article>
468
469 </section>
470
471
472
473
474 </div>
475
476 <nav>
477 <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="LuCI.html">LuCI</a></li><li><a href="LuCI.Class.html">Class</a></li><li><a href="LuCI.dom.html">dom</a></li><li><a href="LuCI.fs.html">fs</a></li><li><a href="LuCI.Headers.html">Headers</a></li><li><a href="LuCI.Network.html">Network</a></li><li><a href="LuCI.Network.Device.html">Device</a></li><li><a href="LuCI.Network.Hosts.html">Hosts</a></li><li><a href="LuCI.Network.Protocol.html">Protocol</a></li><li><a href="LuCI.Network.WifiDevice.html">WifiDevice</a></li><li><a href="LuCI.Network.WifiNetwork.html">WifiNetwork</a></li><li><a href="LuCI.Poll.html">Poll</a></li><li><a href="LuCI.Request.html">Request</a></li><li><a href="LuCI.Request.poll.html">poll</a></li><li><a href="LuCI.Response.html">Response</a></li><li><a href="LuCI.rpc.html">rpc</a></li><li><a href="LuCI.uci.html">uci</a></li><li><a href="LuCI.view.html">view</a></li><li><a href="LuCI.XHR.html">XHR</a></li></ul>
478 </nav>
479
480 <br class="clear">
481
482 <footer>
483 Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Tue Nov 05 2019 09:33:05 GMT+0100 (Central European Standard Time)
484 </footer>
485
486 <script> prettyPrint(); </script>
487 <script src="scripts/linenumber.js"> </script>
488 </body>
489 </html>