Added GET and POST methods to main