Function added to process HTTP requests.