ogcApiRequest
Wrapper over fetch for performing common operations when executing a request to an OGC API, such as:
- Creating the query string
- URL encoding query string values
- Checking whether the response is ok
- Returning the .json() of the response body
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
url Required | string |
the OGC API endpoint that should actually be hit |
|
queryParams Required | IOgcItemQueryParams | IOgcAggregationQueryParams |
query params that should be serialized with the request |
|
options Required | ISearchOgcItemsOptions |
options to customize the search |
Returns
the JSON response from the endpoint
Promise<unknown>
Function defined in common/src/search/_internal/hubSearchItemsHelpers/ogcApiRequest.ts:20