Added processing for GET and POST