mirror of https://github.com/rancher/ui.git
17 lines
374 B
JavaScript
17 lines
374 B
JavaScript
import { ajaxPromise } from '@rancher/ember-api-store/utils/ajax-promise';
|
|
|
|
export default function fetchYaml(yamlLink, yamlOnly = true){
|
|
const params = {
|
|
method: 'GET',
|
|
url: yamlLink,
|
|
};
|
|
|
|
if ( yamlOnly ) {
|
|
params['headers'] = { Accept: 'application/yaml' };
|
|
}
|
|
|
|
return ajaxPromise(params).then((data) => {
|
|
return data.xhr.responseText;
|
|
})
|
|
}
|