Questions tagged [http-method]

HTTP methods used to designate the appropriate action to direct a server towards a resource. GET and POST are the most widely known; PATCH and DELETE also fit in that category, among others.

355 questions
9
votes
1 answer

Are HTTP methods case sensitive?

To ask a question related to Are HTTP headers case-sensitive?, if HTTP methods are case sensitive, what do most servers do with a "get" or "post" vs a "GET" or "POST"? For example, it looks like Apache httpd returns "501 Method Not Implemented" in…
wsanders
  • 300
  • 5
  • 9
9
votes
3 answers

Best HTTP Method for Get or Create

I'm writing an HTTP based API, and I have a situation where the user specifies a resource, and if that resource doesn't yet exist the server creates it. It's basically built on top of Django's get_or_create method. What would be the most…
rectangletangle
  • 50,393
  • 94
  • 205
  • 275
8
votes
1 answer

Use DELETE form method in Html.BeginForm()?

I'd like to use the appropriate HTTP method when possible. In this case, when a button is clicked to delete something, I want to fire the controller action with the attribute [HttpDelete]. However, I can't seem to create a form with this method -…
Josh M.
  • 26,437
  • 24
  • 119
  • 200
8
votes
1 answer

Official way to implements PATCH method in REST with partial update

I definitely didn't find clear way to do partial updates quite automatically (possible by comparing field by field object in databse and partial object). I saw some tracks like : here but I don't know what is its magic MapperService here but quite…
Danton
  • 221
  • 2
  • 13
8
votes
1 answer

Is There a Table That Shows HTTP Method Support by Browser

Possible Duplicate: Are the PUT, DELETE, HEAD, etc methods available in most web browsers? I've seen lots of stuff that generally say "not all browser support all HTTP methods" etc., but is there a nice table that shows specifically which HTTP…
Rob
  • 4,093
  • 5
  • 44
  • 54
8
votes
4 answers

Is there any performance difference when using different HTTP methods?

I know how HTTP methods work and for what they are designed, but I'm curious to know if some methods are faster than others when using just to get data. In the team I'm working on I noticed a lot of JQuery ajax requests like this below: $.ajax({url:…
Marcelo Assis
  • 5,136
  • 3
  • 33
  • 54
7
votes
2 answers

Difference between idempotent and safe HTTP methods in REST APIs

How could the PUT method be idempotent but not safe? Can someone explain it out? HTTP Method Idempotent Safe OPTIONS yes yes GET yes yes HEAD yes yes PUT yes …
pradeep m
  • 73
  • 1
  • 4
7
votes
5 answers

HTTP method to represent "fire and forget" actions in RESTful service

Thinking about REST, it's relatively easy to map HTTP methods to CRUD actions: POST for create, GET for read, etc. But what about "fire and forget" actions? What HTTP method would best represent a fire and forget action such as triggering a batch…
Richard Kettelerij
  • 2,049
  • 14
  • 17
7
votes
3 answers

Using ajax post,get, put, delete etc Vs html post and get only in spring pros and cons

I joined a project which uses spring framework and all the calls are made by ajax requests and the redirection after success is defined in the view itself and passed to the ajax JS function through a hidden input (so the return ModelAndView at the…
Ismail Marmoush
  • 13,140
  • 25
  • 80
  • 114
7
votes
3 answers

How do I do HTTP Purge from Java?

I'm trying to perform a PURGE with HttpUrlConnection like this: private void callVarnish(URL url) { HttpURLConnection conn = null; try { conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod(PURGE_METHOD); …
jakob
  • 5,979
  • 7
  • 64
  • 103
7
votes
2 answers

HTTP Method to use for adding to a collection in a RESTful API

I have a resource that represents a collection of tags: /users/{username}/tags An API client should be able to add a set of tags to this collection in a single HTTP request. I thought about how to do this and first thought about using the PUT or…
driangle
  • 11,601
  • 5
  • 47
  • 54
6
votes
1 answer

PUT request to upload a file not working in Flask

I am working on a web application using Flask. One of the views is supposed to accept uploaded files through PUT requests, however I only can get POST requests with $ curl -F upload=@filename URL to work properly. With PUT requests such as $ curl…
Adrian
  • 1,837
  • 1
  • 20
  • 21
6
votes
2 answers

Blueimp jQuery File Upload and HttpHandler: No File and always "OPTIONS" HttpMethod

I'm struggeling getting the Blueimp jQuery File-Uploader working on MVC 3 with IIS 7.5 on Windows Server 2008 R2. I'm using an HttpHandler to handle the Upload, which get's called. But the HttpHandler never recieves a file nor the HttpMethod "POST"…
Phil
  • 568
  • 3
  • 19
6
votes
1 answer

HTTP POST method treated like GET on WebApi

I've been creating a WebApi controller, and I'm trying to use a HttpPost request to submit a new user for registration. This works fine on my localhost, but when I publish it to Azure I get a 405 method not allowed error with the message: "The…
6
votes
4 answers

How do the httppost, httpput etc attributes in ASP.NET MVC 2 work?

In ASP.NET MVC 2, a couple of new action filter attributes were introduced, as "shorthand" for attributes in ASP.NET MVC 1; for example, applying the HttpPostAttribute does the same thing as applying [AcceptVerbs(HttpVerbs.Post)] to an action…
Tomas Aschan
  • 58,548
  • 56
  • 243
  • 402
1 2
3
23 24