Added support for all the http methods (a bit hacky)