Skip to content

basalt / drives-dropbox/src / apiArg

Function: apiArg() ​

> apiArg(value): string

Defined in: drives-dropbox/src/metadata.ts:111

JSON for the Dropbox-API-Arg header.

The argument travels in an HTTP header, so it has to be ASCII: Dropbox documents that non-ASCII characters must be escaped as \uXXXX, and a file named relatório.pdf is the common case, not an edge one. JSON.stringify already escapes control characters, which is what keeps a filename containing a newline from splitting the header.

Parameters ​

value ​

unknown

Returns ​

string

Released under the MIT License.