ServiceStack - RestService OPTION

ServiceStack RestService has handlers for Get, Put, Post, Patch, but not Option. I would like to use the "Option" option to tell the client what operations are available with authorization (role).

Is this possible, bad practice, already implemented in ServiceStack, another?

+4
source share
1 answer

Check the ServiceStack New API for handling OPTION requests, mainly if you want to send back the CORS headers in the parameter request, which you can now do:

public class ReqstarsService : Service { [EnableCors] public void Options(Reqstar request) {} } 
+4
source

Source: https://habr.com/ru/post/1432689/


All Articles