def METHOD_NAME(self):
    global globalShutdown
    if re.search(self.ENGAGEMENTS_PATTERN, self.path):
        # Add response status code.
        self.send_response(requests.codes.ok)
        # Add response headers.
        self.send_header('Content-Type', 'application/json')
        self.end_headers()
        response_content = '''{"address":"tcp://localhost:5557","endpointId":"3799ef49-e222-48e9-8d62-424872663139","minimumPriority":null,"expiresAt":"2021-01-27T18:23:13Z","quantumProcessorId":"Aspen-8","userId":"00u4i1atsfsrjqiiy356","credentials":{"clientPublic":"BFshSYpjB+=r%Y+Y?)pY.9i)MzfRL]aH{RxxGni:","clientSecret":"N{}@EVSpQ{LfTdNrSi$rRCcBY((D/ec>2N&1&7E4","serverPublic":"7juj@N=?QI(i1]:B)i>)HKf1^X]TjpPsBb$1n[r"}}'''
        # Add response content.
        self.wfile.write(response_content.encode('utf-8'))
        return
    elif re.search(self.COMPILER_PATTERN, self.path):
        # Add response status code.
        self.send_response(requests.codes.ok)
        content_length = int(self.headers['Content-Length']) 
        post_data = self.rfile.read(content_length).decode('utf-8') 
        post_data_json = json.loads(post_data)
        seen_quil_code = post_data_json['quil']
        seen_quil_code = 'num_shots = {}\n'.format(post_data_json['num_shots']) + seen_quil_code
        fout = open('.tmp_quil_code', 'w')
        fout.write(seen_quil_code)
        fout.close()
        # Add response headers.
        self.send_header('Content-Type', 'application/json')
        self.end_headers()
        f = open(CURRENT_TEST_DIR+'/resources/compiler_response.json', 'r')
        response_content = f.read()
        f.close()
        # Add response content.
        self.wfile.write(response_content.encode('utf-8'))
        return
    elif re.search(self.SHUTDOWN_PATTERN, self.path):
        # Add response status code.
        self.send_response(requests.codes.ok)
        # Add response headers.
        self.send_header('Content-Type', 'application/json')
        self.end_headers()
        response_content = ''
        self.wfile.write(response_content.encode('utf-8'))
        globalShutdown = True
        return