def delete_with_payload(rsrc, payload, additional_headers = {}, &block)
      headers = (@cnx.options[:headers] || {}).merge(additional_headers)
      @last_http_response = RestClient::Request.execute(
        @cnx.options.merge(
          method: :delete,
          url: @cnx[rsrc].url,
          payload: payload,
          headers: headers
        ),
        &(block || @block)
      )
    rescue RestClient::ExceptionWithResponse => e
      handle_http_error e
    end
def delete_with_payload(rsrc, payload, additional_headers = {}, &block)
      headers = (@cnx.options[:headers] || {}).merge(additional_headers)
      @last_http_response = RestClient::Request.execute(
        @cnx.options.merge(
          method: :delete,
          url: @cnx[rsrc].url,
          payload: payload,
          headers: headers
        ),
        &(block || @block)
      )
    rescue RestClient::ExceptionWithResponse => e
      handle_http_error e
    end
RestClient::Resource#delete doesn't take an HTTP payload,
 but some JSS API resources require it (notably, logflush).

 This method uses RestClient::Request#execute
 to do the same thing that RestClient::Resource#delete does, but
 adding the payload.

 @param rsrc[String] the sub-resource we're DELETEing

 @param payload[String] The XML to be passed with the DELETE

 @param additional_headers[Type] See RestClient::Request#execute

 @param &block[Type] See RestClient::Request#execute

 @return [String] the XML response from the server.