1 | <!DOCTYPE html>
|
2 | <html lang="en">
|
3 | <head>
|
4 | <meta charset="utf-8">
|
5 | <title>Global - Documentation</title>
|
6 |
|
7 | <script src="scripts/prettify/prettify.js"></script>
|
8 | <script src="scripts/prettify/lang-css.js"></script>
|
9 | |
10 |
|
11 |
|
12 | <link type="text/css" rel="stylesheet" href="styles/prettify.css">
|
13 | <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
|
14 | <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
15 | </head>
|
16 | <body>
|
17 |
|
18 | <input type="checkbox" id="nav-trigger" class="nav-trigger" />
|
19 | <label for="nav-trigger" class="navicon-button x">
|
20 | <div class="navicon"></div>
|
21 | </label>
|
22 |
|
23 | <label for="nav-trigger" class="overlay"></label>
|
24 |
|
25 | <nav>
|
26 | <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="HttpTransportBuilder.html">HttpTransportBuilder</a><ul class='methods'><li data-type='method'><a href="HttpTransportBuilder.html#createClient">createClient</a></li><li data-type='method'><a href="HttpTransportBuilder.html#retries">retries</a></li><li data-type='method'><a href="HttpTransportBuilder.html#retryDelay">retryDelay</a></li><li data-type='method'><a href="HttpTransportBuilder.html#use">use</a></li><li data-type='method'><a href="HttpTransportBuilder.html#userAgent">userAgent</a></li></ul></li><li><a href="HttpTransportClient.html">HttpTransportClient</a><ul class='methods'><li data-type='method'><a href="HttpTransportClient.html#asBody">asBody</a></li><li data-type='method'><a href="HttpTransportClient.html#asResponse">asResponse</a></li><li data-type='method'><a href="HttpTransportClient.html#delete">delete</a></li><li data-type='method'><a href="HttpTransportClient.html#get">get</a></li><li data-type='method'><a href="HttpTransportClient.html#head">head</a></li><li data-type='method'><a href="HttpTransportClient.html#headers">headers</a></li><li data-type='method'><a href="HttpTransportClient.html#patch">patch</a></li><li data-type='method'><a href="HttpTransportClient.html#post">post</a></li><li data-type='method'><a href="HttpTransportClient.html#put">put</a></li><li data-type='method'><a href="HttpTransportClient.html#query">query</a></li><li data-type='method'><a href="HttpTransportClient.html#retry">retry</a></li><li data-type='method'><a href="HttpTransportClient.html#timeout">timeout</a></li><li data-type='method'><a href="HttpTransportClient.html#use">use</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#retryDelay">retryDelay</a></li></ul>
|
27 | </nav>
|
28 |
|
29 | <div id="main">
|
30 |
|
31 | <h1 class="page-title">Global</h1>
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 | <section>
|
40 |
|
41 | <header>
|
42 |
|
43 | <h2>
|
44 |
|
45 | </h2>
|
46 |
|
47 |
|
48 | </header>
|
49 |
|
50 | <article>
|
51 | <div class="container-overview">
|
52 |
|
53 |
|
54 |
|
55 | <dl class="details">
|
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 | </dl>
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 | </div>
|
98 |
|
99 |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 | <h3 class="subsection-title">Methods</h3>
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 | <h4 class="name" id="retryDelay"><span class="type-signature"></span>retryDelay<span class="signature">(timeout)</span><span class="type-signature"></span></h4>
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 | <dl class="details">
|
127 |
|
128 |
|
129 | <dt class="tag-source">Source:</dt>
|
130 | <dd class="tag-source"><ul class="dummy"><li>
|
131 | <a href="client.js.html">client.js</a>, <a href="client.js.html#line237">line 237</a>
|
132 | </li></ul></dd>
|
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 | </dl>
|
165 |
|
166 |
|
167 |
|
168 |
|
169 |
|
170 | <div class="description">
|
171 | <p>Set the delay between retries in ms</p>
|
172 | </div>
|
173 |
|
174 |
|
175 |
|
176 |
|
177 |
|
178 |
|
179 |
|
180 |
|
181 |
|
182 | <h5>Example</h5>
|
183 |
|
184 | <pre class="prettyprint"><code>const httpTransport = require('@bbc/http-transport');
|
185 |
|
186 | const response = await httpTransport.createClient()
|
187 | .retry(2)
|
188 | .retryDelay(200)
|
189 | .asResponse();</code></pre>
|
190 |
|
191 |
|
192 |
|
193 |
|
194 | <h5>Parameters:</h5>
|
195 |
|
196 |
|
197 | <table class="params">
|
198 | <thead>
|
199 | <tr>
|
200 |
|
201 | <th>Name</th>
|
202 |
|
203 |
|
204 | <th>Type</th>
|
205 |
|
206 |
|
207 |
|
208 |
|
209 |
|
210 | <th class="last">Description</th>
|
211 | </tr>
|
212 | </thead>
|
213 |
|
214 | <tbody>
|
215 |
|
216 |
|
217 | <tr>
|
218 |
|
219 | <td class="name"><code>timeout</code></td>
|
220 |
|
221 |
|
222 | <td class="type">
|
223 |
|
224 |
|
225 | <span class="param-type">integer</span>
|
226 |
|
227 |
|
228 |
|
229 | </td>
|
230 |
|
231 |
|
232 |
|
233 |
|
234 |
|
235 | <td class="description last"><p>number of ms to wait between retries (default: 100)</p></td>
|
236 | </tr>
|
237 |
|
238 |
|
239 | </tbody>
|
240 | </table>
|
241 |
|
242 |
|
243 |
|
244 |
|
245 |
|
246 |
|
247 |
|
248 |
|
249 |
|
250 |
|
251 |
|
252 |
|
253 |
|
254 |
|
255 | <h5>Returns:</h5>
|
256 |
|
257 |
|
258 | <div class="param-desc">
|
259 | <p>a HttpTransport instance</p>
|
260 | </div>
|
261 |
|
262 |
|
263 |
|
264 |
|
265 |
|
266 |
|
267 |
|
268 |
|
269 |
|
270 |
|
271 |
|
272 |
|
273 | </article>
|
274 |
|
275 | </section>
|
276 |
|
277 |
|
278 |
|
279 |
|
280 | </div>
|
281 |
|
282 | <br class="clear">
|
283 |
|
284 | <footer>
|
285 | Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon Mar 05 2018 11:46:03 GMT+0000 (GMT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
286 | </footer>
|
287 |
|
288 | <script>prettyPrint();</script>
|
289 | <script src="scripts/linenumber.js"></script>
|
290 | </body>
|
291 | </html> |
\ | No newline at end of file |