Describe the bug
I've tried to read the value of a variable and got the following response:
{
"Header": {
"MessageType": "READ_RESPONSE",
"ClientHandle": "1"
},
"Body": {
"Value": {
"Type": "1",
"Body": "true"
},
"SourceTimestamp": "2019-07-26T11:10:20Z",
"ServerTimestamp": "2019-07-26T11:10:20Z"
}
}
First of all, the type is wrong anf equals 1. And I think, if variable 'Boolean' has type Boolean, the body should be true not string "ture".
To Reproduce
- Run demo application:
docker-compose run -p 8080:8080 -p 8081:8081 -p 8082:8082 webserver
- Launch script:
import websocket
import json
msg = {
'Header': {
'MessageType':'READ_REQUEST',
'ClientHandle':'1'
},
'Body': { 'Variable' : 'Boolean'}
}
ws = websocket.create_connection('ws://127.0.0.1:8081')
ws.send(json.dumps(msg))
resp = ws.recv()
json.loads(resp)
Expected behavior
The expected message should be:
{
"Header": {
"MessageType": "READ_RESPONSE",
"ClientHandle": "1"
},
"Body": {
"Value": {
"Type": "Boolean",
"Body": "true"
},
"SourceTimestamp": "2019-07-26T11:10:20Z",
"ServerTimestamp": "2019-07-26T11:10:20Z"
}
}
Describe the bug
I've tried to read the value of a variable and got the following response:
{ "Header": { "MessageType": "READ_RESPONSE", "ClientHandle": "1" }, "Body": { "Value": { "Type": "1", "Body": "true" }, "SourceTimestamp": "2019-07-26T11:10:20Z", "ServerTimestamp": "2019-07-26T11:10:20Z" } }First of all, the type is wrong anf equals 1. And I think, if variable 'Boolean' has type Boolean, the body should be true not string "ture".
To Reproduce
Expected behavior
The expected message should be:
{ "Header": { "MessageType": "READ_RESPONSE", "ClientHandle": "1" }, "Body": { "Value": { "Type": "Boolean", "Body": "true" }, "SourceTimestamp": "2019-07-26T11:10:20Z", "ServerTimestamp": "2019-07-26T11:10:20Z" } }