A
A
Artem Nanavov2019-12-27 12:16:49
Vue.js
Artem Nanavov, 2019-12-27 12:16:49

Uncaught (in promise) SyntaxError: Unexpected end of input at eval?

I have such an error ( Uncaught (in promise) SyntaxError: Unexpected end of input
at eval )
I just don't know how to solve it, and can you please explain why this happens
here is the code

mounted() {            
            const url = "http://gallery.dev.webant.ru/api/photos"
            function getUsers( mehtod, url ) {
                return fetch( url, { mode: 'no-cors' } ).then( response => {
                    return response.json()
                } )
            }
            
            getUsers( 'GET', url )
                .then( data => console.log(data) )
        },

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question