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

121
Vistas
Akairo Discord using fetch without import

I'm using fetch to send data to a .json but since i can't refactor my requires to import and can't use fetch with require, i can't use it. And since it's not a web app, i can't use the script tag as i saw in other posts.

My code

*..*
fetch('./src/Data/hf.json', {
        method: 'POST',
        body: JSON.stringify({
            id: Math.random().toString(36).substr(2, 9),
            title: args.args,
            createdByUser: user.tag,
            createdById: user.id,
            timestamp: message.createdTimestamp,
        }),
        headers : {
            'Content-type': 'application/json; charset=UTF-8'
        }
    }).then(res => {
        if (res.ok) return res.json();
    });
*..*
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