<commit_before>import urllib.request
import urllib.error
import urllib.parse
import sys
import os.path

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))

from checkit.response_endpoint import ResponseEndpoint
from checkit.logs import Logs


class RequestService():

    def __init__(self, api_name):
        self.api_name = api_name
        self.endpoints = []

    def get_code(self, url):
        try:
            code = urllib.request.urlopen(url).getcode()
            Logs.info(url + " --- code response:" + str(code))
            return code
        except urllib.error.HTTPError as e:
            Logs.error_status_code(e.code)
            return e.code
        except urllib.error.URLError as e:
            Logs.general_error(e.reason)
            return e.reason
        except ValueError as e:
            Logs.general_error("".join(e.args))
            return e.args

    def addEndpoint(self, endpoint):
        self.endpoints.append(endpoint)

    def addEndpoints(self, endpointsList):
        self.endpoints = endpointsList

    def getEndpointList(self):
        return self.endpoints
<commit_msg>Removed get_code method from request_service.<commit_after>import urllib.request
import urllib.error
import urllib.parse
import sys
import os.path

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))

from checkit.response_endpoint import ResponseEndpoint
from checkit.logs import Logs


class RequestService():

    def __init__(self, api_name):
        self.api_name = api_name
        self.endpoints = []

    def addEndpoint(self, endpoint):
        self.endpoints.append(endpoint)

    def addEndpoints(self, endpointsList):
        self.endpoints = endpointsList

    def getEndpointList(self):
        return self.endpoints

{'fraction_non_alphanumeric': 0.09491525423728814, 'fraction_numerical': 0.0, 'mean_word_length': 2.784188034188034, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6508472', 'n_tokens_mistral': 538, 'n_tokens_neox': 524, 'n_words': 117}