<commit_before>module NetworkHelpers
  require 'net/http'

  ZAPP_URL = "https://zapp.applicaster/com/api/v1/admin"
  ACCOUNTS_URL = "https://accounts.applicaster.com/api/v1"

  class Request
    attr_accessor :response, :body

    def initialize(uri, params)
      @uri = uri
      @params = params
    end

    def do_request(method)
      Net::HTTP.start(@uri.host, @uri.port, use_ssl: use_ssl?) do |connection|
        connection.read_timeout = 20
        @response = connection.send(method, request_url, *request_params)
        handle_response
        self
      end
    end

    private

    def request_url
      return @uri.path unless @method == :get<commit_msg>assign @method instance variable in Request class<commit_after>module NetworkHelpers
  require 'net/http'

  ZAPP_URL = "https://zapp.applicaster/com/api/v1/admin"
  ACCOUNTS_URL = "https://accounts.applicaster.com/api/v1"

  class Request
    attr_accessor :response, :body

    def initialize(uri, params)
      @uri = uri
      @params = params
    end

    def do_request(method)
      Net::HTTP.start(@uri.host, @uri.port, use_ssl: use_ssl?) do |connection|
        connection.read_timeout = 20
        @method = method
        @response = connection.send(method, request_url, *request_params)
        handle_response
        self
      end
    end

    private

    def request_url
      return @uri.path unless @method == :get
{'fraction_non_alphanumeric': 0.10177935943060498, 'fraction_numerical': 0.0056939501779359435, 'mean_word_length': 2.7795698924731185, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '1167007', 'n_tokens_mistral': 456, 'n_tokens_neox': 435, 'n_words': 101}