Skip to content

Using different HTTP Methods when mapping controllers

Mat Ryer edited this page Oct 16, 2013 · 2 revisions

To use different HTTP methods when mapping controllers, you can overwrite the goweb.DefaultHttpHandler().HttpMethodFor* variables.

For example, to use POST for a deletes instead of DELETE, you could do this:

goweb.DefaultHttpHandler().HttpMethodForDeleteOne = gowebhttp.MethodPost
goweb.DefaultHttpHandler().HttpMethodForDeleteMany = gowebhttp.MethodPost

Clone this wiki locally