simple:rest-method-mixin
A mixin for mdg:validated-method
to configure the HTTP endpoint for that Method when using simple:rest
.
Use it like this:
1const method = new ValidatedMethod({ 2 name: 'method', 3 mixins: [RestMethodMixin], 4 validate: ..., 5 restOptions: { 6 url: '/my-custom-url', 7 // any other options 8 }, 9 run() { 10 return 5; 11 } 12});
This mixin just calls SimpleRest.setMethodOptions
with the restOptions
passed in.