API Service Options
Quadrata SDK API Service Options
Each API service will have different options that you can pass in.
Each service allows you to pass in options mapped to RequestInit
which are passed to the underlying fetch
function. You can use this option to control cache
behavior, add headers
, and more.
Runtime Environment and Allow Unsafe Client API Call
Some API calls are intended to only be executed on the server.
Of these API calls that are only intended to be executed on the server, some of them allow you to pass an option to allowUnsafeClientApiCall
. This option is a boolean that allows you to bypass the server check and execute the API call on the client.
Any service that requires a private key and generates a signed request does not allow you to pass this option.
Example
API Signed Requests
When using a service that generates a request signature, you must pass in your private key.
You have options as to how you can pass in your private key:
privateKeyPem
: A string that contains the private key in PEM format.privateKeyDerBase64
: A base64 encoded string that contains the private key in DER format.privateKeyDer
: A binary string that contains the private key in DER format.privateKey
: ACryptoKey
object that contains the private key. (UsesSubtleCrypto
)
Example
Last updated