I have a create-react-app small project and I am trying to fetch from an yaml downloaded from SwaggerHubfile and I can't figure it out.
The structure of the project is as in the image:
I am trying to acces something that looks like this:
paths:
/users/jobs/list:
So far I tried this:
function getData () {
fetch("http://localhost/3000/data.json")
.then(data => data.json())
.then(resp => console.log(resp));
}
getData();
but it doesn't work. What can I do to fetch data from an yaml file? Or can I fetch straight from SwaggerHub by using just the url?