Skip to content
Snippets Groups Projects
Commit f2719ea4 authored by jkerdreu's avatar jkerdreu
Browse files

Added type info, need some rework right now

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2352 b32b6428-25c9-4566-ad07-03861ab6144f
parent d45aa709
Branches
No related tags found
No related merge requests found
......@@ -113,7 +113,15 @@ def send_request(addr,action):
""" quick & dirty way to send request to device"""
body = {}
for k in request.query.keys():
body.update({k:request.query[k]})
if k.endswith('_type'):
continue
value = request.query[k]
tmp = '%s_type' % k
if tmp in request.query.keys():
type_ = request.query[tmp]
if type_ == 'int':value = int(value)
if type_ == 'float':value = float(value)
body.update({k:value})
response.headers['Content-Type'] = 'application/json'
uid = tools.str_to_uuid(addr)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment