Questions tagged [http-verbs]

HTTP Verbs represent the request methods that are recognized as part of the Hypertext Transfer Protocol. These include but are not limited to POST, GET , PUT and DELETE.

219 questions
6
votes
1 answer

Why are OPTIONS requests not arriving in my ASP.NET application?

I can't seem to receive HTTP OPTIONS requests in my IIS6 hosted ASP.NET application. I'm testing it using a debug breakpoint (and file-log) in my Global.asax's Application_BeginRequest method. The breakpoint is never hit and the client gets a HTTP…
Josef Pfleger
  • 74,165
  • 16
  • 97
  • 99
6
votes
3 answers

Limiting HTTP verbs on every action

Is it a good practice to limit the available HTTP verbs for every action? My code is cleaner without [HttpGet], [HttpPost], [HttpPut], or [HttpDelete] decorating every action, but it might also be less robust or secure. I don't see this done in…
MikeWyatt
  • 7,842
  • 10
  • 50
  • 71
6
votes
5 answers

Why do I need PUT or DELETE Http Verbs?

After the release of MVC 2, I have started to check and play with the new features, but i couldn't understand what is the use of PUT and DELETE verbs. I have searched about it and read some articles but I couldn't get it. What is the main purpose of…
Barbaros Alp
  • 6,405
  • 8
  • 47
  • 61
6
votes
3 answers

Http verb decorator for Django?

In ASP.NET MVC, you can use the AcceptVerbs attribute to correlate a view function with a verb: public ActionResult Create() { // do get stuff } [AcceptVerbs(HttpVerbs.Post)] public ActionResult Create(FormCollection collection) { // do…
palmsey
  • 5,812
  • 3
  • 37
  • 41
5
votes
1 answer

Right HTTP verb for sending email

what's the correct http verb for a request that simply make the server send an email without altering the status of the whole webapp? I am working on a Rails project and I need to define the route someway: Rails.application.routes.draw do get…
masciugo
  • 1,113
  • 11
  • 19
4
votes
3 answers

How Rails 3 decides which HTTP verb will be used when clicking on a link generated by "link_to"?

I have two links: <%= link_to("Edit", edit_product_path(product.id)) %> <%= link_to("Delete", product, :method => :delete) %> The generated links are: Edit
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
4
votes
0 answers

Unable to disable Http TRACE method on Azure

I have an App Service on Azure that has four virtual applications and no application in the root directory. I have a need to disable Http TRACE requests for all applications and the root URL (a custom domain). Right now, if I run nmap…
detarallt
  • 313
  • 2
  • 9
4
votes
2 answers

Implicit Verbs from Method name

If I create a webApi controller, and populate it with methods prefixed with http verbs, the Api is able to correctly imply what verb should be used on that controller. public class TestController : ApiController { public string GetData() { …
Obsidian Phoenix
  • 4,083
  • 1
  • 22
  • 60
4
votes
3 answers

How to get PUT and DELETE verbs to work with WebAPI on IIS

I am using WebAPI PUT and DELETE methods to perform actions from my website via AJAX using jQuery. My server is Windows Server 2008 R2 with Plesk installed. POST and GET requests work just fine, but PUT and DELETE fail. I was originally getting a…
Luke
  • 22,826
  • 31
  • 110
  • 193
4
votes
2 answers

HTTP Error 400 : The request verb is invalid in IIS 8.5

I have hosted ASP NET 4.5 application in Windows Server 2012 R2 (IIS Version 8.5.9600.16384). But once in a while I am getting an error like Bad Request - Invalid Verb HTTP Error 400. The request verb is invalid while going from one page to another.…
Gopesh Sharma
  • 6,730
  • 4
  • 25
  • 35
4
votes
2 answers

PATCH Ajax request in Laravel

Is it possible to make Ajax PATCH requests to Laravel, or am I restricted to POST? Laravel uses PATCH in input hidden fields. However, I am not using form elements—just buttons that should partially update a record when clicked (via an Ajax…
Rafael
  • 7,605
  • 13
  • 31
  • 46
3
votes
0 answers

How to manage arrays with JSON Patch without tracking element positions?

JavaScript Object Notation (JSON) Patch (RFC6902)—not to be confused with JSON Merge Patch (RFC7386)—has several examples of array manipulation: Adding an Array Element: [ { "op": "add", "path": "/foo/1", "value": "qux" } ] Removing an Array…
DurandA
  • 1,095
  • 1
  • 17
  • 35
3
votes
2 answers

How to design DELETE REST API that requires lots of data?

I want to implement a DELETE REST API. But I need the option to provide a list of IDs to be deleted. This list could be arbitrarily long and may not fit within a URL. I know POST supports this, but support for this and DELETE seems debatable. I…
Jonathan Wood
  • 65,341
  • 71
  • 269
  • 466
3
votes
1 answer

Disable HTTP Options method in ASP.Net Core 3.1

We have a requirement of disabling the HTTP OPTIONS method in an ASPNET Core Web application due as a part of security fixes. How can we disable the HTTP OPTIONS method in ASP.Net core 3.1 API?
user5772731
3
votes
3 answers

REST API Designing Endpoints (Action/Verb => Noun/Resource )

According to this guide of designing REST API endpoints, we should never use action/verbs in URL (e.g. /addNewEmployee), if we want to perform an action we should only use HTTP verbs with respective resource/noun (e.g. POST /employees). Now, I've a…
Faisal Khurshid
  • 1,869
  • 3
  • 21
  • 27
1 2
3
14 15