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

182
Views
NodeJS: @esri/arcgis-rest-request - How to adjust Fetch options?

I am looking to adjust the Fetch request option when making a request with @esri/arcgis-rest-request, but unfortunately I cannot find any documentation related to this.

import fetch from "node-fetch";
import FormData from "isomorphic-form-data";
import arcgisRestRequest from "@esri/arcgis-rest-request";
arcgisRestRequest.setDefaultRequestOptions({ fetch, FormData });

arcgisRestRequest.request("https://www.arcgis.com/sharing/rest/info")
  .then(response => console.log(response));

When using the request method I am getting errors regarding the certificate of the NodeJS server:

FetchError: request to https://xxx/server/rest/self?token=xxx=json failed, reason: unable to get local issuer certificate

I would like to pass something like:

const fetchOptions = {
  ...
  agent:new https.Agent({rejectUnauthorized: false}),
  ...
};

to avoid the certificate error.

How can I accomplish this?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Looking at their code it looks like you should be able to just do

arcgisRestRequest.request(
  "https://www.arcgis.com/sharing/rest/info",
  {
    agent:new https.Agent({rejectUnauthorized: false})
  }
)
  .then(response => console.log(response));
about 4 years ago · Juan Pablo Isaza Report
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!