Skip to content

Commit 85bd2d4

Browse files
committed
Edits
1 parent 2ef855a commit 85bd2d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

includes/iot-hub-howto-device-management-node.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ client.open(function(err) {
103103

104104
Call [onDeviceMethod](/javascript/api/azure-iot-device/client?#azure-iot-device-client-ondevicemethod) to create a callback handler function or coroutine that is called when a direct method is received. The listener is associated with a method name keyword, such as "reboot". The method name can be used in an IoT Hub or backend application to trigger the callback method on the device.
105105

106-
The callback handler function should call `send` to send a response acknowledgment message to the calling application.
106+
The callback handler function should call `response.send` to send a response acknowledgment message to the calling application.
107107

108108
This example sets up a direct method handler named `onReboot` that is called when the "reboot" direct method name is used.
109109

110110
```javascript
111111
client.onDeviceMethod('reboot', onReboot);
112112
```
113113

114-
In this example, the `onReboot` callback method implements the direct method on the device. The code is executed when the "reboot" direct method is called from a service application. The function calls `send` to send a response acknowledgment message to the calling application.
114+
In this example, the `onReboot` callback method implements the direct method on the device. The code is executed when the "reboot" direct method is called from a service application. The function calls `response.send` to send a response acknowledgment message to the calling application.
115115

116116
```javascript
117117
var onReboot = function(request, response) {

0 commit comments

Comments
 (0)