improved REST configuration and method handler