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.
Questions tagged [http-method]
355 questions
6
votes
2 answers
Using a custom value for HttpMethod
I'm using the HttpClient and I need to set a non-standard type for the HttpMethod. Where using HttpWebRequest only expects a string, HttpClient expects an HttpMethod. Enumerating the available values in HttpMethod, I don't see a way to add a custom…

earthling
- 5,084
- 9
- 46
- 90
6
votes
2 answers
Azure Websites PHP API - 405 Method Not Allowed on PUT and DELETE
I'm building a simple PHP web service using Azure Web Sites and I'm having trouble getting it to support PUT and DELETE http methods. Assuming it's something that'll have to go into the web.config file - I've tried a few options from around the…

Daniel Sharp
- 191
- 1
- 11
6
votes
2 answers
Silex - OPTIONS method
I'm using Silex framework for mocking REST server. I need to create uri for OPTIONS http method, but Application class offers only methods for PUT, GET, POST and DELETE. Is it possible to add and use a custom http method?

Peter Krejci
- 3,182
- 6
- 31
- 49
5
votes
1 answer
MVC3 Why do I get "Child actions are not allowed to perform redirect actions" error?
I got an action List
//[HttpGet] (will come back to that!)
public ViewResult List(int page = 1)
{
//blah blah blah
return View(viewModel);
}
In its view we render action:
@{
…

Mariusz.W
- 1,347
- 12
- 19
5
votes
0 answers
VTTEST and MOZILAVT HTTP methods, what are these?
I got several alerts in the last two days bcs our service responded 5xx in a large percentage of the requests (tipically offhours when we have zero to low traffic anyway).
When I checked the application logs I found these two;
Illegal request,…

tg44
- 810
- 1
- 8
- 21
5
votes
2 answers
REST API design for a "reset to defaults" operation
I'm surprised to find so little mention of this dilemma online, and it makes me wonder if I'm totally missing something.
Assume I have a singleton resource called Settings. It is created on init/install of my web server, but certain users can modify…

motig88
- 402
- 5
- 16
5
votes
2 answers
Spring Framework, enable PUT method
I got a problem with capturing PUT request sent to server.
These are my methods:
@RequestMapping(method= RequestMethod.GET)
public String getCity(@PathVariable(value="cid") String cid, @RequestParam(value="State") Integer state, Model model)…

Magician
- 1,944
- 6
- 24
- 38
5
votes
8 answers
Is it possible to implement X-HTTP-Method-Override in ASP.NET MVC?
I'm implementing a prototype of a RESTful API using ASP.NET MVC and apart from the odd bug here and there I've achieve all the requirements I set out at the start, apart from callers being able to use the X-HTTP-Method-Override custom header to…

Greg Beech
- 133,383
- 43
- 204
- 250
5
votes
1 answer
Combining Basic Authentication and LimitExcept in Apache 2.2 Virtual Host
I'm trying to satisfy the following requirements (in Apache HTTPD 2.2):
If the HTTP method is anything but HEAD, POST, or GET do not allow access, regardless of any of the following.
If the user is internal, allow access without the basic…

Jamie Jackson
- 1,158
- 3
- 19
- 34
5
votes
4 answers
Why would you use PUT instead of PATCH?
From what I understand, PUT requests send the whole object while PATCH requests just send the diff, which is used to update the object in the database.
Why would you do a PUT over a PATCH? PATCH seems much lighter. I don't see any upsides to PUT…

Adam Zerner
- 17,797
- 15
- 90
- 156
4
votes
3 answers
REST - Does the PUT method have to remove an optional field when it is omitted?
I have a resource Car which have some required fields and another optional ones.
The Car was created with the following request:
POST /cars
{
plate: "XYZ-A2C4",
color: "blue,
owner: "John" //OPTIONAL
}
A REST client wants to update all…

ethanxyz_0
- 713
- 12
- 37
4
votes
2 answers
What is the correct way to handle multiple HTTP Methods in Azure Functions (NodeJS)
When building an application in Azure Functions you can specify the HTTP Methods that are accepted in the function.json
Given an API that you can do multiple functions on (GET, PUT POST etc) what is the best way to create that function or…

Bluephlame
- 3,901
- 4
- 35
- 51
4
votes
2 answers
How can I send a request using the HTTP Options method with HTTPClient (Java 11)?
As the title says, I would like to know how to send an HTTP request using HTTPClient with the OPTIONS method in Java. I have looked at the HTTP methods that can be used (GET, POST, PUT and DELETE) and I have not seen this option.
An example of a…

PablooD9
- 83
- 7
4
votes
2 answers
Rest Api: When to use Post, PUT, PATCH and Delete
I am working on a restful api and I need to update a resource (i.e. a customer detail record with 10 fields).
On Add request, I send a Post request with complete record.
On update request, I send a PUT request with complete record of 10 fields.…

TAB
- 1,944
- 8
- 28
- 45
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