Constructor options for UrlStore.

Hierarchy

Properties

accepts?: string

The contents of the HTML accept header, which defines the content-types that are acceptable for the response. You want to change this if you want to support another format. In that case, you also need to change the Codec used by this Store.

Default

"application/javascript, application/json"

The Feature instances. The Codec only needs to support the decode method. There is no need for an encode method as this is a read-only Store. You want to change this if you want to support another format. In that case, you also need to change the accept header by specifying the accept property.

Default

the {@link UrlStore}.
credentials?: boolean

Whether credentials should be included with every HTTP request.

handleAs?: "string" | "arraybuffer" | "blob" | "json"

This value determines what type of data to pass into Codec.decode.

  • "string" uses a string primitive. This is the default and the fallback value.
  • "arraybuffer" uses a ArrayBuffer object.
  • "blob" uses a raw Blob object.
  • "json" parses a JSON response into a JS object.

Default

"string"

Since

2020.1

The reference in which the Feature instances will be defined when querying this store. This should match the reference of the Store is used. This reference will be passed to the Feature objects.

Since

2022.0

requestHeaders?: null | HttpRequestHeaders

An object literal that represents headers (as a key-value map) to send with each HTTP request. If set (and not empty), an XHR with the specified headers will be performed instead of creating an Image.

requestParameters?: null | HttpRequestParameters

An object literal that represents URL parameters (as a key-value map) to send with each HTTP request. If set (and not empty), an XHR with the specified query parameters will be performed instead of creating an Image.

Since

2021.0

target: string

The base URL from which to retrieve the resource