Adding request handler.

Copying the request handler from older code.