hubApiRequest

Function
import { hubApiRequest } from "@esri/hub-common";
//
hubApiRequest(
  "/datasets",
  requestOptions
})
  .then(response);

make a request to the Hub API

Parameters

Parameter Type Default Notes
route Required string

API route

requestOptions Optional IHubRequestOptions

request options

Available requestOptions

Property Type Notes
authentication Optional ArcGISIdentityManager
fetch Optional function(input: RequestInfo, init: RequestInit) : Promise<Response>

The implementation of fetch to use. Defaults to a global fetch.

hubApiUrl Optional string
isPortal Optional boolean
portalSelf Optional IHubRequestOptionsPortalSelf

Returns

Promise<any>

Function defined in common/src/request.ts:33