Programmatic way to see if client browser supports PUT / DELETE methods

前端 未结 1 1861
我寻月下人不归
我寻月下人不归 2021-01-07 13:29

Is there a way to see if a client browser supports PUT or SEARCH methods for usage with JQuery & AJAX requests?

  • HTML5 PUT/DELETE methods not working in C
1条回答
  •  孤城傲影
    2021-01-07 13:41

    The common way of handling the lack of PUT and DELETE support in most browsers is to use HTTP POST tunneling. Basically you use a POST and add the real VERB to a X-HTTP-Method-Override HTTP header. On the service you check for the latter, if not found use the normal HTTP method.

    See here for more info.

    0 讨论(0)
提交回复
热议问题