# @todo: Add support for parameters
# this stores the output in self.content
def generateBody(self):
- self.content = '{ "command": "' + self.command + '" '
+ self.content = '{ "command": "' + self.command + '"'
if (len(self.params)):
- self.content += self.params
- self.content += '}'
+ self.content += ', "parameters": { ' + self.params + ' }'
+ self.content += ' }'
# Generate HTTP headers
#
# This is a storage for generated command (input data to be sent over POST)
content = ''
-
+
# This class represents the HTTP response
class CAResponse:
print(self.status)
print(self.reason)
print(self.body)
-