Add setRequestHandler function