request(url:Â string,ârequestOptions:Â IRequestOptions): Promise<any>
Generic method for making HTTP requests to ArcGIS REST API endpoints.
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
import { request } from '@esri/arcgis-rest-request';
request('https://www.arcgis.com/sharing/rest')
.then(response) // response.currentVersion === 5.2
request('https://www.arcgis.com/sharing/rest', {
httpMethod: "GET"
})
request('https://www.arcgis.com/sharing/rest/search', {
params: { q: 'parks' }
})
.then(response) // response.total => 78379
Parameters Parameter Type Default Notes url
string
The URL of the ArcGIS REST API endpoint.
requestOptions
IRequestOptions ...
Options for the request, including parameters relevant to the endpoint.
ReturnsÂPromise<any>
A Promise that will resolve with the data from the response.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4