Thing creates a HTTP server, GadgetKeeper connects to it to send a request and receive a response.
Communication Protocols: | HTTP |
---|---|
RPC Protocol: | JSON-RPC 2.0 |
How it works: |
|
Constraints: |
|
Connection Settings
Field | Required | Description | Dialog |
---|---|---|---|
Name | x | connection name | |
Protocol | x | select "json-rpc over http" | |
Host | x | Thing host | |
Port | x | Thing HTTP server port | |
Secure | use SSL | ||
Virtual path | URL path | ||
Connection, ms | x |
number of milliseconds GadgetKeeper can spent on connection to Thing |
|
Response, ms | x |
number of milliseconds GadgetKeeper will wait for Thing to receive message and send response |
|
Date format | x |
date format representation:
|
|
Description | connection description |
Example Scenario Using HTTP
Given
- Thing has remote method "echo"
- Thing wants to be able to handle this method
Workflow
- Thing creates a socket server
- GadgetKeeper opens a connection to Thing HTTP server
-
GadgetKeeper sends a JSON command to the connection:
-
Thing receives the JSON command and sends a response back to the connection:
-
GadgetKeeper receives the response and closes the connection