/provider/getFrom
The getFrom provider module allows XYZ modules to get resources either from configured sources.
- Source
Methods
(async, inner) Cloudfront(ref, cache) → {Promise.<(String|JSON|Error)>}
The method will extract a cloudfront URL from the ref param string.
The fetch request will be created from the cloudfront provider module with the cloudfront url.
The fetch request will be stored in a cache Map object for requests from the cacheTemplates workspace module.
Parameters:
Name | Type | Description |
---|---|---|
ref | string | Cloudfront resource reference. |
cache | boolean | The resource fetch request should be cached. |
- Source
Returns:
The fetch is resolved into either a string or JSON depending on the url ending.
- Type:
- Promise.<(String|JSON|Error)>