<commit_before>module VCloud
  module RestApi
    include Session
    
    def refresh (session = current_session)
      #TODO: verify_ssl proper for prod
      request = RestClient::Request.new(
        :url => @href,
        :method => 'get',
        :verify_ssl => false,
        :headers => session.token.merge({ :accept => self.class.type+";version=#{session.api_version}" })
      )
      response = request.execute
      parse_response(response)
    end
          
    def create
    end
    
    def update
    end
    
    def delete      
    end
    
    def post (url, payload, content_type, session = current_session)
      #TODO: verify_ssl proper for prod
      request = RestClient::Request.new(
        :url => url,
        :method => 'post',
        :payload => payload,
        :verify_ssl => false,
        :headers => session.token.merge({
          :accept => VCloud::Constants::ACCEPT_HEADER+';version=#{@api_version}',
          :content_type => content_type})
      )
      puts request.inspect
      request.execute
    end<commit_msg>Fix to include the indicated vcloud api version<commit_after>module VCloud
  module RestApi
    include Session
    
    def refresh (session = current_session)
      #TODO: verify_ssl proper for prod
      request = RestClient::Request.new(
        :url => @href,
        :method => 'get',
        :verify_ssl => false,
        :headers => session.token.merge({ :accept => self.class.type+";version=#{session.api_version}" })
      )
      response = request.execute
      parse_response(response)
    end
          
    def create
    end
    
    def update
    end
    
    def delete      
    end
    
    def post (url, payload, content_type, session = current_session)
      #TODO: verify_ssl proper for prod
      request = RestClient::Request.new(
        :url => url,
        :method => 'post',
        :payload => payload,
        :verify_ssl => false,
        :headers => session.token.merge({
          :accept => VCloud::Constants::ACCEPT_HEADER+";version=#{session.api_version}",
          :content_type => content_type})
      )
      puts request.inspect
      request.execute
    end
{'fraction_non_alphanumeric': 0.11003236245954692, 'fraction_numerical': 0.0, 'mean_word_length': 2.1591240875912407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5153933', 'n_tokens_mistral': 610, 'n_tokens_neox': 612, 'n_words': 150}