Custom portal not being used when set with `setDefaultRequestOptions()`
See original GitHub issueSetting a custom portal with IRequestOptions via setDefaultRequestOptions()
is not working for me; making calls to arcgis.com instead of the custom portal. Looks like it should be mixing it in: https://github.com/Esri/arcgis-rest-js/blob/master/packages/arcgis-rest-request/src/request.ts#L37-L47 and https://github.com/Esri/arcgis-rest-js/blob/master/packages/arcgis-rest-request/src/request.ts#L195. I’ve set other IRequestOptions
with setDefaultRequestOptions()
to test and they are being successfully mixed in. Is this not the proper method for setting a custom portal? Or is there something I’m missing in the portal package to do so? Or?
And a mostly unrelated question for you Esri folks that work with portal a lot. Is there a simple query to get items by folder id? I looked at how portal content fetches items for a folder. It makes several pretty complex queries and ultimately queries the item ids to display. I’m hoping there’s an easier way but the lack of a function in the portal package has me thinking not. Thanks.
Edit: ownerfolder: <ID>
works just fine if you remember to pass auth with the request.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
Not at this time. But…
And any custom request options are inaccessible. https://github.com/Esri/arcgis-rest-js/blob/master/packages/arcgis-rest-request/src/request.ts#L15
If time permits I may PR
getDefaultRequestOptions()
andgetFolderItems()
.Reopening this. I think that anonymous requests with a
portal
set withsetDefaultRequestOptions
should still work since people might use this to access public data on their own portals.