Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

write data b64 encoded in response #330

Closed
edaniszewski opened this issue Aug 7, 2019 · 1 comment
Closed

write data b64 encoded in response #330

edaniszewski opened this issue Aug 7, 2019 · 1 comment
Assignees

Comments

@edaniszewski
Copy link
Contributor

@hoanhan101 discovered this issue:

when writing to a device, the response will reflect back the action/data of the write request to make it easier to identify. the reflected data field comes back b64 encoded because it is specified as a []byte in the gRPC spec, which I guess gets encoded on transport

➜  ~ curl -d '{"action": "speed", "data": "101"}' -H "Content-Type: application/json" -X POST http://localhost:5000/v3/write/998e6025-ddfb-533a-9efe-dd26d512b555
[
  {
    "id":"53dba5d7-9ef6-4639-b30a-c6ff9af6a4ba",
    "device":"998e6025-ddfb-533a-9efe-dd26d512b555",
    "context":{
      "action":"speed",
      "data":"MTAx",
      "transaction":""
    },
    "timeout":"30s"
  }
]

This issue is to ensure the data is decoded prior to returning the response.

@edaniszewski
Copy link
Contributor Author

Issue moved to vapor-ware/synse-server-grpc #58 via ZenHub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant