Making the requested changes by LeBinturong on reddit. Thanks again!

Using the short version of error handling.
Returning 405 status code when a GET request is made.
Removing unnecessary rows.Close()
Using a shorter version of initializing variables.