Communication with the backend
piroor edited this page Jan 18, 2013
·
7 revisions
{
"id": "abcdefg", // unique string
"date": "2001-08-02T10:45:23.5+09:00",
"replyTo": "192.168.1.2:3334", // optional. the hostname and the listening port of the sender itself
"inReplyTo": "0123456789", // optional. one-way message don't have this field.
"statusCode": 200, // compatible to HTTP status code
"type": "search.result", // "createtable.result", "removetable.result", etc.
"body": {...}
}
For example, search feature:
- Request's type is "search". The "body" is same to the JSON defined in Message format: search feature.
- Response's type is "search.result". The "body" is same to the JSON defined in Message format: search feature. The id of "inReplyTo" is same to the id of the request message.