Commit 992ca155 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰

[5137] Parameters generation fixed.

parent 2939c088
...@@ -24,10 +24,10 @@ class CARequest: ...@@ -24,10 +24,10 @@ class CARequest:
# @todo: Add support for parameters # @todo: Add support for parameters
# this stores the output in self.content # this stores the output in self.content
def generateBody(self): def generateBody(self):
self.content = '{ "command": "' + self.command + '" ' self.content = '{ "command": "' + self.command + '"'
if (len(self.params)): if (len(self.params)):
self.content += self.params self.content += ', "parameters": { ' + self.params + ' }'
self.content += '}' self.content += ' }'
# Generate HTTP headers # Generate HTTP headers
# #
...@@ -40,7 +40,7 @@ class CARequest: ...@@ -40,7 +40,7 @@ class CARequest:
# This is a storage for generated command (input data to be sent over POST) # This is a storage for generated command (input data to be sent over POST)
content = '' content = ''
# This class represents the HTTP response # This class represents the HTTP response
class CAResponse: class CAResponse:
...@@ -67,4 +67,3 @@ class CAResponse: ...@@ -67,4 +67,3 @@ class CAResponse:
print(self.status) print(self.status)
print(self.reason) print(self.reason)
print(self.body) print(self.body)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment