Back to Content

BluetoothRemoteGATTCharacteristic: writeValueWithResponse() method

files/en-us/web/api/bluetoothremotegattcharacteristic/writevaluewithresponse/index.md

latest819 B
Original Source

{{APIRef("Bluetooth API")}}{{SeeCompatTable}}{{SecureContext_Header}}

The BluetoothRemoteGATTCharacteristic.writeValueWithResponse() method sets a {{domxref("BluetoothRemoteGATTCharacteristic")}} object's value property to the bytes contained in a given {{jsxref("ArrayBuffer")}}, {{jsxref("TypedArray")}}, or {{jsxref("DataView")}}, writes the characteristic value with required response, and returns the resulting {{JSxRef("Promise")}}.

Syntax

js-nolint
writeValueWithResponse(value)

Parameters

  • value
    • : An {{jsxref("ArrayBuffer")}}, {{jsxref("TypedArray")}}, or {{jsxref("DataView")}}.

Return value

A {{jsxref("Promise")}}.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}