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
methodString
Type
-
String
Source
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
clear() → {OptionsRequest}
Clears all configured metadata on the request, resetting it to a default state.
Returns
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
-
Error when the dictionary argument uses a non-string key.
-
Error when the dictionary argument is not an object, null, or a Map.
Source
toJSON() → {*}
Returns the metadata object to be utilized for stringifying into JSON.
Returns
-
*