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

113
Views
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
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!