@AppKu/StashKu

@AppKu/StashKu

v1.0.46

Class

OptionsRequest

This class defines a StashKu OPTIONS request that instructs StashKu to gather the schema for models from a particular resource, and return a usable model (constructor) type.

Constructor

new OptionsRequest(fromopt)

Creates a new OptionsRequest instance. A OPTIONS request that instructs StashKu to gather the schema for models from a particular resource.

Parameters

  • from String <optional>

    The target resource name for the OPTIONS request.

Source

Members

Methods

all()

Sets the request resource 'from' value to a "*" which instructs storage engines to retrieve all available model types instead of a specific resource.

Source

from(name) → {OptionsRequest}

Sets the target resource name for the request, optionally specifying an alias for use with specifying properties across joins.

Parameters

  • name String

    The name of the target resource in data storage. In an OPTIONS request you may also specify a * value to retrieve all model types.

Returns

Throws

Error if the "name" argument value is not a string or null.

Source

headers(dictionary) → {OptionsRequest}

Sets or clears headers on the request that can be used to set engine-specific options for the request. If a null value is passed, the headers are cleared.

Parameters

  • dictionary Object | Map.<String, *>

    A map or object defining the headers and values.

Returns

Throws

  1. Error when the dictionary argument uses a non-string key.

  2. Error when the dictionary argument is not an object, null, or a Map.

Source