@@ -18,19 +18,19 @@ native fetch API is used to perform requests.
1818
1919## Configuration
2020
21- Type: [ object] [ 4 ]
21+ Type: [ object] [ 3 ]
2222
2323### Properties
2424
25- * ` endpoint ` ** [ string] [ 3 ] ?** API base URL
26- * ` prettyPrintJson ` ** [ boolean] [ 6 ] ?** pretty print json for response/request on console logs.
27- * ` printCurl ` ** [ boolean] [ 6 ] ?** print cURL request on console logs. False by default.
28- * ` timeout ` ** [ number] [ 5 ] ?** timeout for requests in milliseconds. 10000ms by default.
29- * ` defaultHeaders ` ** [ object] [ 4 ] ?** a list of default headers.
30- * ` httpAgent ` ** [ object] [ 4 ] ?** create an agent with SSL certificate
31- * ` onRequest ` ** [ function] [ 7 ] ?** an async function which can update request object.
32- * ` onResponse ` ** [ function] [ 7 ] ?** an async function which can update response object.
33- * ` maxUploadFileSize ` ** [ number] [ 5 ] ?** set the max content file size in MB when performing api calls.
25+ * ` endpoint ` ** [ string] [ 2 ] ?** API base URL
26+ * ` prettyPrintJson ` ** [ boolean] [ 5 ] ?** pretty print json for response/request on console logs.
27+ * ` printCurl ` ** [ boolean] [ 5 ] ?** print cURL request on console logs. False by default.
28+ * ` timeout ` ** [ number] [ 4 ] ?** timeout for requests in milliseconds. 10000ms by default.
29+ * ` defaultHeaders ` ** [ object] [ 3 ] ?** a list of default headers.
30+ * ` httpAgent ` ** [ object] [ 3 ] ?** create an agent with SSL certificate
31+ * ` onRequest ` ** [ function] [ 6 ] ?** an async function which can update request object.
32+ * ` onResponse ` ** [ function] [ 6 ] ?** an async function which can update response object.
33+ * ` maxUploadFileSize ` ** [ number] [ 4 ] ?** set the max content file size in MB when performing api calls.
3434
3535
3636
@@ -104,13 +104,13 @@ this.helpers['REST']._executeRequest({
104104
105105### _ executeRequest
106106
107- Executes fetch request
107+ Executes request
108108
109109#### Parameters
110110
111111* ` request ` ** any**   ;
112112
113- Returns ** [ Promise] [ 2 ] <any >** response
113+ Returns ** [ Promise] [ 1 ] <any >** response
114114
115115### _ url
116116
@@ -131,15 +131,15 @@ I.amBearerAuthenticated(secret('heregoestoken'))
131131
132132#### Parameters
133133
134- * ` accessToken ` ** ([ string] [ 3 ] | CodeceptJS.Secret)** Bearer access token
134+ * ` accessToken ` ** ([ string] [ 2 ] | CodeceptJS.Secret)** Bearer access token
135135
136136### haveRequestHeaders
137137
138138Sets request headers for all requests of this test
139139
140140#### Parameters
141141
142- * ` headers ` ** [ object] [ 4 ] ** headers list
142+ * ` headers ` ** [ object] [ 3 ] ** headers list
143143
144144### sendDeleteRequest
145145
@@ -152,9 +152,9 @@ I.sendDeleteRequest('/api/users/1');
152152#### Parameters
153153
154154* ` url ` ** any**   ;
155- * ` headers ` ** [ object] [ 4 ] ** the headers object to be sent. By default, it is sent as an empty object
155+ * ` headers ` ** [ object] [ 3 ] ** the headers object to be sent. By default, it is sent as an empty object
156156
157- Returns ** [ Promise] [ 2 ] <any >** response
157+ Returns ** [ Promise] [ 1 ] <any >** response
158158
159159### sendDeleteRequestWithPayload
160160
@@ -168,9 +168,9 @@ I.sendDeleteRequestWithPayload('/api/users/1', { author: 'john' });
168168
169169* ` url ` ** any**   ;
170170* ` payload ` ** any** the payload to be sent. By default it is sent as an empty object
171- * ` headers ` ** [ object] [ 4 ] ** the headers object to be sent. By default, it is sent as an empty object
171+ * ` headers ` ** [ object] [ 3 ] ** the headers object to be sent. By default, it is sent as an empty object
172172
173- Returns ** [ Promise] [ 2 ] <any >** response
173+ Returns ** [ Promise] [ 1 ] <any >** response
174174
175175### sendGetRequest
176176
@@ -183,9 +183,9 @@ I.sendGetRequest('/api/users.json');
183183#### Parameters
184184
185185* ` url ` ** any**   ;
186- * ` headers ` ** [ object] [ 4 ] ** the headers object to be sent. By default, it is sent as an empty object
186+ * ` headers ` ** [ object] [ 3 ] ** the headers object to be sent. By default, it is sent as an empty object
187187
188- Returns ** [ Promise] [ 2 ] <any >** response
188+ Returns ** [ Promise] [ 1 ] <any >** response
189189
190190### sendHeadRequest
191191
@@ -198,9 +198,9 @@ I.sendHeadRequest('/api/users.json');
198198#### Parameters
199199
200200* ` url ` ** any**   ;
201- * ` headers ` ** [ object] [ 4 ] ** the headers object to be sent. By default, it is sent as an empty object
201+ * ` headers ` ** [ object] [ 3 ] ** the headers object to be sent. By default, it is sent as an empty object
202202
203- Returns ** [ Promise] [ 2 ] <any >** response
203+ Returns ** [ Promise] [ 1 ] <any >** response
204204
205205### sendPatchRequest
206206
@@ -216,11 +216,11 @@ I.sendPatchRequest('/api/users.json', secret({ "email": "user@user.com" }));
216216
217217#### Parameters
218218
219- * ` url ` ** [ string] [ 3 ] **   ;
219+ * ` url ` ** [ string] [ 2 ] **   ;
220220* ` payload ` ** any** the payload to be sent. By default it is sent as an empty object
221- * ` headers ` ** [ object] [ 4 ] ** the headers object to be sent. By default it is sent as an empty object
221+ * ` headers ` ** [ object] [ 3 ] ** the headers object to be sent. By default it is sent as an empty object
222222
223- Returns ** [ Promise] [ 2 ] <any >** response
223+ Returns ** [ Promise] [ 1 ] <any >** response
224224
225225### sendPostRequest
226226
@@ -238,9 +238,9 @@ I.sendPostRequest('/api/users.json', secret({ "email": "user@user.com" }));
238238
239239* ` url ` ** any**   ;
240240* ` payload ` ** any** the payload to be sent. By default, it is sent as an empty object
241- * ` headers ` ** [ object] [ 4 ] ** the headers object to be sent. By default, it is sent as an empty object
241+ * ` headers ` ** [ object] [ 3 ] ** the headers object to be sent. By default, it is sent as an empty object
242242
243- Returns ** [ Promise] [ 2 ] <any >** response
243+ Returns ** [ Promise] [ 1 ] <any >** response
244244
245245### sendPutRequest
246246
@@ -256,11 +256,11 @@ I.sendPutRequest('/api/users.json', secret({ "email": "user@user.com" }));
256256
257257#### Parameters
258258
259- * ` url ` ** [ string] [ 3 ] **   ;
259+ * ` url ` ** [ string] [ 2 ] **   ;
260260* ` payload ` ** any** the payload to be sent. By default it is sent as an empty object
261- * ` headers ` ** [ object] [ 4 ] ** the headers object to be sent. By default it is sent as an empty object
261+ * ` headers ` ** [ object] [ 3 ] ** the headers object to be sent. By default it is sent as an empty object
262262
263- Returns ** [ Promise] [ 2 ] <any >** response
263+ Returns ** [ Promise] [ 1 ] <any >** response
264264
265265### setRequestTimeout
266266
@@ -272,18 +272,16 @@ I.setRequestTimeout(10000); // In milliseconds
272272
273273#### Parameters
274274
275- * ` newTimeout ` ** [ number] [ 5 ] ** timeout in milliseconds
275+ * ` newTimeout ` ** [ number] [ 4 ] ** timeout in milliseconds
276276
277+ [ 1 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
277278
279+ [ 2 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
278280
279- [ 2 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
281+ [ 3 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
280282
281- [ 3 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
283+ [ 4 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
282284
283- [ 4 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
285+ [ 5 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
284286
285- [ 5 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
286-
287- [ 6 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
288-
289- [ 7 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
287+ [ 6 ] : https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
0 commit comments