Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

300
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda