Coming Soon
-
STASHKU_FETCH_MODEL_HEADER
Determines whether the fetch request to the HTTP endpoint will forward the model header whenSTASHKU_MODEL_HEADERis enabled. By default this is disabled and the headermodelproperty will not be sent. Setting this flag totruewill forward themodelheader of the StashKu request.JavaScript Example
new StashKu({ fetch: { model: { header: false } } } })Shell/Environment Example
export STASHKU_FETCH_MODEL_HEADER=false -
STASHKU_FETCH_MODEL_PATH_PROPERTY
Instructs StashKu which property from the$stashkuobject on a model type to populate the resource (toorfrom) on a request. Can be"name","slug","plural.name","plural.slug", or"resource"(default).This requires that the
STASHKU_MODEL_HEADERsetting istrue, or that you manually pass the appropriatemodelheader object in requests to the fetch engine. If the appropriate property is not found in the header, the request's resource (to/from) is used instead.JavaScript Example
new StashKu({ fetch: { model: { pathProperty: 'plural.slug' } } } })Shell/Environment Example
export STASHKU_FETCH_MODEL_PATH_PROPERTY=plural.slug