code: def _post_data(options=None, xml=None):
      '''
      Post data to Nagios NRDP
      '''
      params = {'token': options['token'].strip(), 'cmd': 'submitcheck', 'XMLDATA': xml}
  
      res = salt.utils.http.query(
          url=options['url'],
          method='POST',
          params=params,
          data='',
          decode=True,
          status=True,
          header_dict={},
          opts=__opts__,
      )
  
      if res.get('status', None) == salt.ext.six.moves.http_client.OK:
          if res.get('dict', None) and isinstance(res['dict'], list):
              _content = res['dict'][0]
              if _content.get('status', None):
                  return True
              else:
                  return False
          else:
              log.error('No content returned from Nagios NRDP.')
              return False
      else:
          log.error(
              'Error returned from Nagios NRDP. Status code: %s.',
              res.status_code
          )
          return Falsf _post_data(options=None, xml=None):
      '''
      Post data to Nagios NRDP
      '''
      params = {'token': options['token'].strip(), 'cmd': 'submitcheck', 'XMLDATA': xml}
  
      res = salt.utils.http.query(
          url=options['url'],
          method='POST',
          params=params,
          data='',
          decode=True,
          status=True,
          header_dict={},
          opts=__opts__,
      )
  
      if res.get('status', None) == salt.ext.six.moves.http_client.OK:
          if res.get('dict', None) and isinstance(res['dict'], list):
              _content = res['dict'][0]
              if _content.get('status', None):
                  return True
              else:
                  return False
          else:
              log.error('No content returned from Nagios NRDP.')
              return False
      else:
          log.error(
              'Error returned from Nagios NRDP. Status code: %s.',
              res.status_code
          )
          return False
docs: Post data to Nagios NRDP