Modernizing the Fitbit Developer Experience.
The Fitbit Web APIs are moving to a new, scalable infrastructure. We will be deprecating the legacy Fitbit Web API in September 2026. To ensure uninterrupted data continuity for your users, you will need to migrate your applications. Detailed migration guides are live on the Google Health API developer site.
Form-data API
chevron down
 

Form-data API

Class: FormData

The FormData class provides an easy way to construct a multipart/form-data request.

The Fitbit implementation of this only supports string, not Blob or File types.

Methods

append()

append(name: string, value: string, fileName?: string | undefined)

Returns: void

Append a new value onto an existing key, adding it if it does not exist.

delete()

delete(name: string)

Returns: void

Deletes a key/value pair if it exists.

entries()

Returns: IterableIterator<string, string>

Returns an iterator over all key value pairs.

get()

get(name: string)

Returns: string or null

Gets a value by name, returning the first matching value with this name, and returning null if it does not exist.

getAll()

getAll(name: string)

Returns: string[]

Gets values by name, returning an array of values matching this name.

has()

has(name: string)

Returns: boolean

Returns true if a key exists with this name, false otherwise.

keys()

Returns: IterableIterator<string>

Returns an iterator over all keys.

set()

set(name: string, value: string)

Returns: void

Sets a value given a name and value, replacing any existing value with the same name if one exists.

values()

Returns: IterableIterator<string>

Returns an iterator over all form values.

FormDataEntryValue

String: string