Support for the legacy Fitbit Web API ends on September 30, 2026
Important: Support for the legacy Fitbit Web API ends on September 30, 2026. After this date the API will continue to operate, but Google will no longer fix bugs or provide API support. On October 30, 2026, the Fitbit Web API will be turned off and will no longer function or sync data to or from Fitbit users. To continue accessing data for your users after this date, migrate to the Google Health API.
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