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]
332 questions
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?
![](../../users/profiles/656945.webp)
Peter Krejci
- 2,897
- 3
- 28
- 45
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:
@{
…
![](../../users/profiles/1141501.webp)
Mariusz.W
- 1,327
- 12
- 19
5
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 …
![](../../users/profiles/11690236.webp)
pradeep m
- 53
- 4
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)…
![](../../users/profiles/388506.webp)
Magician
- 1,434
- 3
- 21
- 35
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…
![](../../users/profiles/13552.webp)
Greg Beech
- 122,952
- 42
- 199
- 241
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…
![](../../users/profiles/1026263.webp)
Jamie Jackson
- 965
- 2
- 16
- 29
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…
![](../../users/profiles/1927876.webp)
Adam Zerner
- 12,221
- 13
- 62
- 128
5
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…
![](../../users/profiles/476260.webp)
driangle
- 10,905
- 2
- 43
- 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…
![](../../users/profiles/11688896.webp)
PablooD9
- 73
- 6
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
![](../../users/profiles/247243.webp)
Misha Moroshko
- 148,413
- 200
- 467
- 700
4
votes
2 answers
How to pass authentication details in a HTTP DELETE request?
I'm trying to create a REST API following the HTTP method semantics but I got stuck with the DELETE method.
In my use case, the service is behind a gateway that authenticates the user. This service uses a SSO token that then is used to authenticate…
![](../../users/profiles/2214751.webp)
Juan Vega
- 843
- 1
- 10
- 29
4
votes
0 answers
How to exclude specific HTTP method from `javax.servlet.Filter`?
I would like to exclude HTTP OPTION requests from my javax.servlet.Filter. How can I achieve it?
Filter registration:
@Bean
public FilterRegistrationBean filterRegistrationBean() {
FilterRegistrationBean registrationBean = new…
![](../../users/profiles/1315357.webp)
Artegon
- 2,734
- 6
- 32
- 62
4
votes
3 answers
Security: Brute-forcing GET-requests by URL?
what should my concerns be if I we're about to make an application that handles logins the following way:
http://api.myApp.example/printSomething/username/password/
How insecure is it compared to a normal login page that are based on POSTed user…
![](../../users/profiles/198128.webp)
Industrial
- 36,181
- 63
- 182
- 286
4
votes
1 answer
Should a logoff request be designed as GET or POST?
I'm implementing some rest services. The first service I have to call according to the SDK is a http POST request to logon. The input are my user's credentials, and the output is my session id.
To logout, I also have to make a http POST request, but…
![](../../users/profiles/1884155.webp)
user1884155
- 3,183
- 2
- 39
- 96
4
votes
1 answer
How to map different HTTP methods on the same url to different controllers?
I have my API for a small part of my application split over two controllers, because of (external) requirements on the casing of JSON data in the API (some requests should use camelCasing, while others should use PascalCasing).
Now, I have a url…
![](../../users/profiles/38055.webp)
Tomas Aschan
- 53,075
- 51
- 214
- 362