Added support for the "state" attribute coming from the server for methods.