Need help with an Axios problem

Posted 1 month ago by DigiProduct

Can anyone quickly tell me what stupid thing I am doing here?

This is in a Vue component that seems to be being displayed, and doesn't report any errors

My Axios completes, and I can see my data being returned in the Network tab in Chrome Dev Tools

YET ... none of the console.logs after the Axios gets actioned ... not even the one that should log "loadLeads ended"

I must be doing something stupid ... but I just can't see it

Can anyone give me a pointer?



import axios from 'axios'


export default {
  name: 'PageIndex',
  data () {
    return {
        contacts: [],
      
    }
  },
  methods: {
    loadLeads: function() {
        console.log('loadLeads started');

        this.axios.get("localhost:8000/getleads")
        .then(
            response=>{
                console.log(response)
            }           
        )
        .catch(
            error=>{
                console.log(error)
            }
        );

        console.log('loadLeads ended');
    },


Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.