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

184
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
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