I'm trying to make a fetch request from within a React component on the front end of my application in order to render a list of all the resources ( or any of the resources ) in my cloudinary account. I have an API key and secret that I was using in the url, which I passed as the argument to my fetch function.
Here's the error the console logs:
"TypeError: Failed to execute 'fetch' on 'Window': Request cannot be constructed from a URL that includes credentials: https://<<API KEY>>:<<API SECRET>>@api.cloudinary.com/v1_1/<<RESOURCE NAME>>/resources/image"
When I hit the url from the browser, I get the JSON I want. How can I retreive those resources from within my React component?
Thanks a million in advance.
codbase can be found here: https://github.com/PantherHawk/prints20-2018
Please sign in to leave a comment.