code: def deserialize(self, data):
          '''
          Deserialize the data based on request content type headers
          '''
          ct_in_map = {
              'application/x-www-form-urlencoded': self._form_loader,
              'application/json': salt.utils.json.loads,
              'application/x-yaml': salt.utils.yaml.safe_load,
              'text/yaml': salt.utils.yaml.safe_load,
              # because people are terrible and don't mean what they say
              'text/plain': salt.utils.json.loads
          }
  
          try:
              # Use cgi.parse_header to correctly separate parameters from value
              value, parameters = cgi.parse_header(self.request.headers['Content-Type'])
              return ct_in_map[value](tornado.escape.native_str(data))
          except KeyError:
              self.send_error(406)
          except ValueError:
              self.send_error(400f deserialize(self, data):
          '''
          Deserialize the data based on request content type headers
          '''
          ct_in_map = {
              'application/x-www-form-urlencoded': self._form_loader,
              'application/json': salt.utils.json.loads,
              'application/x-yaml': salt.utils.yaml.safe_load,
              'text/yaml': salt.utils.yaml.safe_load,
              # because people are terrible and don't mean what they say
              'text/plain': salt.utils.json.loads
          }
  
          try:
              # Use cgi.parse_header to correctly separate parameters from value
              value, parameters = cgi.parse_header(self.request.headers['Content-Type'])
              return ct_in_map[value](tornado.escape.native_str(data))
          except KeyError:
              self.send_error(406)
          except ValueError:
              self.send_error(400)
docs: Deserialize the data based on request content type headers