Functioning prototype that is able to process both GET and POST requests