matheusls

This user has not updated recently.

2 0 0 0
Forum Posts Wiki Points Following Followers

matheusls's forum posts

Avatar image for matheusls
matheusls

2

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#1  Edited By matheusls

I'm building a React app to consume this API but it does not have cors enabled, apparently, so I'm getting this error:

Access to XMLHttpRequest at 'https://comicvine.gamespot.com/api/characters?api_key=API_KEY&format=json&limit=10&offset=0&field_list=id,name' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Is there anyway to get around this? Am I doing something wrong?

This is the request code:

const { data } = axios.get(`${baseUrl}/characters`, { params: { api_key: process.env.REACT_APP_API_KEY, format: 'json', limit: 10, offset: 0, field_list: 'id,name', }, });