CallbackMethodAttribute.AllowedHttpVerbs

Allows specifying of the HTTP Verb that is accepted for the called method.

The default is HttpVerbs.All.

Requests that fail to access the endpoint with the right HTTP Verb will not get called and return a 405 error along with an error object (JSON/XML) that details the error in the body.

public HttpVerbs AllowedHttpVerbs { get; set; }

Example

<<code lang="C#">>// Allow both GET and POST
operations
[CallbackMethod(AllowedHttpVerbs=HttpVerbs.GET | HttpVerbs.POST),
                RouteUrl="stocks/{symbol}"]
public StockQuote GetStockQuote(string symbol)
{ ... }<</code>>

See also:

Class CallbackMethodAttribute

© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic