Skip to content

Commit a790312

Browse files
authored
REST: Changed "endpoint" to optional (#3404)
* REST: Changed endpoint to optional REST API methods can be called with absolute URL ("https://") and therefore the property "endpoint" doesn't need to be specified in general * Fixed REST helper docs
1 parent 6d306ed commit a790312

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/helpers/REST.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Type: [object][4]
2222

2323
### Properties
2424

25-
- `endpoint` **[string][3]** API base URL
25+
- `endpoint` **[string][3]?** API base URL
2626
- `prettyPrintJson` **[boolean][6]?** pretty print json for response/request on console logs
2727
- `timeout` **[number][5]?** timeout for requests in milliseconds. 10000ms by default
2828
- `defaultHeaders` **[object][4]?** a list of default headers

lib/helper/REST.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const { beautify } = require('../utils');
99
*
1010
* @typedef RESTConfig
1111
* @type {object}
12-
* @prop {string} endpoint - API base URL
12+
* @prop {string} [endpoint] - API base URL
1313
* @prop {boolean} [prettyPrintJson=false] - pretty print json for response/request on console logs
1414
* @prop {number} [timeout=1000] - timeout for requests in milliseconds. 10000ms by default
1515
* @prop {object} [defaultHeaders] - a list of default headers

0 commit comments

Comments
 (0)