@AppKu/StashKu

@AppKu/StashKu

v1.0.46

Class

PostRequest

This class defines a StashKu POST request that instructs StashKu to create a new object in storage.

Constructor

new PostRequest(…objectsopt)

Creates a new PostRequest instance. A POST request instructs StashKu to create a new object in storage.

Parameters

  • objects M <optional>
    <repeatable>

    Spread of objects to create in data storage.

Source

Members

Methods

count(enabledopt) → {module:requests/post-request~PostRequest.<M>}

Requests that the response return count numbers (total, affected, returned, etc.) but not objects.

This will result in a Response with an empty data array and may result in faster query execution if you only need the resulting numbers.

Calling this function without an argument enables the flag.

Parameters

  • enabled Boolean <optional>
    true

    A true enables the count-only result. A false disables it.

Returns

Source

headers(dictionary) → {module:requests/post-request~PostRequest.<M>}

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