Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

306
Views
Cannot use axios on localhost

I'm trying to test my code with axios on local but i get that error Object { message: "Network Error", name: "AxiosError", code: "ERR_NETWORK", etc... I tried to change adress to full http://localhost/contact/send & again but with ip... nothing of these works.

Can someone help me fix that issue

My code:

export default {
    name: 'App',
    components: {},
    data() {
        return {
            name: '',
            email: '',
            message: '',
            allowSend: false,
            sent: false
        }
    },
    methods: {
        sendMessage() {
            axios.post('/contact/send', {
                name: this.name,
                email: this.email,
                msg: this.message
            })

            this.sent = true

            setTimeout(() => {
                this.sent = false
            }, 3000)
        },
        checkProps() {
            let nameCheck = false
            let emailCheck = false
            let msgCheck = false

            if(this.name !== '') nameCheck = true
            if(validator(this.email)) emailCheck = true
            if(this.message !== '') msgCheck = true

            if(nameCheck && emailCheck && msgCheck) this.allowSend = true
        }
    },
    template
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!