Update rest.js

Update the parameter of the request callback