code: def http_method(self, data):
          
          data = data.upper()
          if data in ['DELETE', 'GET', 'POST', 'PUT']:
              self._http_method = data
  
              # set content type for commit methods (best guess)
              if self._headers.get('Content-Type') is None and data in ['POST', 'PUT']:
                  self.add_header('Content-Type', 'application/json')
          else:
              raise AttributeError(
                  'Request Object Error: {} is not a valid HTTP method.'.format(data)
              )
docs: The HTTP method for this request.