GetOptions
Defined in: packages/json-api-client/src/types.ts:52
Options for customizing the get request.
Extends
Section titled “Extends”Properties
Section titled “Properties”cacheKey?
Section titled “cacheKey?”optional cacheKey?: string;Defined in: packages/json-api-client/src/types.ts:46
The cache key to use for the request.
If not set, the default cache key of {lang}-{locale}--{entity}--{bundle}--{sha256 hash of query string if exists} will be used.
Inherited from
Section titled “Inherited from”disableAuthentication?
Section titled “disableAuthentication?”optional disableAuthentication?: boolean;Defined in: packages/json-api-client/src/types.ts:41
Whether to disable the authentication for the request.
Inherited from
Section titled “Inherited from”RequestBaseOptions.disableAuthentication
disableCache?
Section titled “disableCache?”optional disableCache?: boolean;Defined in: packages/json-api-client/src/types.ts:36
Whether to disable the cache for the request.
Inherited from
Section titled “Inherited from”RequestBaseOptions.disableCache
locale?
Section titled “locale?”optional locale?: string;Defined in: packages/json-api-client/src/types.ts:26
The locale to use for the request. If not set, the default locale will be used. If no default locale is set, no locale will be used.
Inherited from
Section titled “Inherited from”queryString?
Section titled “queryString?”optional queryString?: string;Defined in: packages/json-api-client/src/types.ts:64
A URL encoded query string to append to the request. See https://www.drupal.org/docs/core-modules-and-themes/core-modules/jsonapi-module/fetching-resources-get for some examples of valid query strings.
Remarks
Section titled “Remarks”To help generate a valid query string, use a library like drupal-jsonapi-params https://www.npmjs.com/package/drupal-jsonapi-params and the toQueryString method.
Example
Section titled “Example”const options = { queryString: "filter[title][value]=My%20recipe",};rawResponse?
Section titled “rawResponse?”optional rawResponse?: boolean;Defined in: packages/json-api-client/src/types.ts:31
Indicates whether the raw HTTP response should be returned. When set to true, the response will not be parsed or processed, providing the raw, unaltered response from the server.