def serialize_to_request(self, parameters, operation_model): target = "%s.%s" % (operation_model.metadata["targetPrefix"], operation_model.name) json_version = operation_model.metadata["jsonVersion"] serialized = self._create_default_request() serialized["method"] = operation_model.http.get("method", self.DEFAULT_METHOD) serialized["headers"] = {"X-Amz-Target": target, "Content-Type": "application/x-amz-json-%s" % json_version} serialized["body"] = json.dumps(parameters) return serialized
def serialize_to_request(self, parameters, operation_model): target = '%s.%s' % (operation_model.metadata['targetPrefix'], operation_model.name) json_version = operation_model.metadata['jsonVersion'] serialized = self._create_default_request() serialized['method'] = operation_model.http.get('method', self.DEFAULT_METHOD) serialized['headers'] = { 'X-Amz-Target': target, 'Content-Type': 'application/x-amz-json-%s' % json_version, } serialized['body'] = json.dumps(parameters) return serialized
def _serialize_body_params(self, params, shape): return json.dumps(params)