Fixed NPE and introduced some useful enums for method and http status values.