Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Similar Issue to earlier this month, the CORS policy does not return a simple get request via axios api #173

Open
tomit4 opened this issue Jul 22, 2021 · 0 comments

Comments

@tomit4
Copy link

tomit4 commented Jul 22, 2021

Hi, I'm following a basic tutorial on Brad Traversy's youtube channel using vuex, but where I call an axios request to the todos db with a limit parameter I get this error message:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://jsonplaceholder/typicode.com/todos?_limit=20. (Reason: CORS request did not succeed).

The axios call in particular is here:

`` async filterTodos({ commit }, e) {
const limit = parseInt(e.target.options[e.target.options.selectedIndex].innerText);

    const response = await axios.get(`https://jsonplaceholder/typicode.com/todos?_limit=${limit}`);

    commit("setTodos", response.data);
}

It could be because I'm new to coding, but from what I've gathered a similar issue was brought up earlier this month, so I thought I'd put this forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant