Questions tagged [http-options-method]

The HTTP OPTIONS request method is commonly used to ask a Web server which HTTP methods the server allows; servers typically respond with just a set of headers that includes the Allow header, whose value lists the allowed methods. The OPTIONS method is also a key part of the CORS protocol.

See also:

141 questions
1
vote
1 answer

Handling cross domain preflight AJAX OPTIONS requests with Spring MVC 4

This is probably a simple answer, but I can't seem to get it to work. In a cross-domain, preflight AJAX request, the client first makes an OPTIONS request just get a set of headers back to figure out what the remote server accepts. Right now, for…
Bal
  • 2,027
  • 4
  • 25
  • 51
1
vote
1 answer

browser not sending CORS HTTP OPTION FOR POST REQUESTS

jQuery should send an HTTP OPTION request to initiate pre-flight CORS, yet it always sends out a HTTP POST. Since it is a POST the browser doesn't get the Access-Control-Allow-Origin or Access-Control-Allow-Method and the browser has NO CHOICE but…
user3338098
  • 907
  • 1
  • 17
  • 38
1
vote
1 answer

For a cross-origin OPTIONS request, is the pre-flight OPTIONS request followed by a "regular" OPTIONS request?

I'm trying to implement proper CORS logic in my service. From looking at all the available documentation, it's not clear to me whether, in the case of a cross-origin OPTIONS request, the client would send (1) a pre-flight OPTIONS request, and if…
Andy Dennie
  • 6,012
  • 2
  • 32
  • 51
1
vote
1 answer

Is Grails missing support for http OPTIONS requests?

When I create the grails 2.2.4 app below, I see responses to POST /options/somewhere but not to OPTIONS /options/somewhere. Is there some way to invoke a controller action on OPTIONS requests? App where POST works and OPTIONS doesn't: $ grails…
Bosh
  • 8,138
  • 11
  • 51
  • 77
1
vote
1 answer

How to Implement HTTP 'OPTIONS' verb for a REST API in Spring MVC?

How to implement HTTP 'OPTIONS' for a REST API in Spring MVC? Or can Spring framework discover by its own based on the controller definition? Are there use-cases for supporting 'OPTIONS' verb for the REST API? Is it common to support 'OPTIONS' for…
Anand Patel
  • 6,031
  • 11
  • 48
  • 67
1
vote
2 answers

Configuring Spring MVC to map GET requests to one method in a controller and OPTIONS requests to another method

This would be pretty easy using annotations: @Controller public class MyController { @RequestMapping(value="/hitmycontroller", method= RequestMethod.OPTIONS) public static void options(HttpServletRequest req,HttpServletResponse resp){ //Do…
Jason S
  • 137
  • 2
  • 9
1
vote
1 answer

Should I expect OPTIONS preflight with all CORS requests?

I have two types of CORS requests configured on the client side. One implements the GET method and the other implements POST. After the initial preflight OPTIONS is issued with the first GET, the subsequent GETs and POSTs (configured nearly…
jerome
  • 4,809
  • 13
  • 53
  • 70
1
vote
0 answers

Inconsistent ASP.NET Web Api Pre-flight OPTIONS

I'm getting an inconsistent preflight HTTP Options request from my single page app. This only happens randomly sometimes and the only way I ameliorate the issue is by pressing F5 and things are good for a while until I kind of go "idle" for a little…
Max Alexander
  • 5,471
  • 6
  • 38
  • 52
1
vote
0 answers

How Web Server responds when it gets "Options" Request?

I want to implement Options method in my HTTP web server. But I didn't yet find the good tutorial of the working of this method. I made one code that implements this method, my code is at the end of this question. But I think the working of server I…
devsda
  • 4,112
  • 9
  • 50
  • 87
1
vote
1 answer

Titanium web app OPTIONS instead of GET

I'm trying to compile a Titanium app for Web. When I try to contact the server via http request in the browser console I see a OPTIONS method instead of a GET method: var request = Ti.Network.createHTTPClient(); request.open('GET',…
ivy
  • 210
  • 1
  • 2
  • 14
1
vote
1 answer

Why are some iOS devices sending OPTIONS requests with Origin: null?

On a website I'm working on, we're seeing quite a few OPTIONS requests from iOS devices that look like CORS preflight checks, but which have Origin: null. Does anyone know what might be causing such requests to be sent with Origin: null rather than…
Mark Longair
  • 446,582
  • 72
  • 411
  • 327
1
vote
2 answers

Play! 2.0 easy fix to OPTIONS response for router catch-all?

Having some annoying issues making AJAX calls simply because almost every browser these days is making an OPTIONS call to the server before the actual AJAX call. Since I am using Play! 2.0, is there any easy way to make a wildcard response to any…
crockpotveggies
  • 12,682
  • 12
  • 70
  • 140
1
vote
1 answer

Web API: HTTP verb 'OPTIONS'

Is there any support in the asp.net mvc 4 web api beta for the HTTP verb 'OPTIONS'? The framework does not automatically send a response. I think you have to do this by yourselve. But is there a method like:…
user437899
  • 8,879
  • 13
  • 51
  • 71
0
votes
0 answers

Disable OPTIONS method with .Net core 6.0 shows CORS error

For Security purpose, I have to disable OPTIONS method on IIS. My application is having .net Core WebAPIs. When I disanble OPTIONS method on IIS, It starts showing CORS Error. Is there any other way, I can disable OPTIONS method in .Net core 6.0?
user1041109
  • 11
  • 1
  • 4
0
votes
1 answer

Express OPTIONS handler never gets a chance to run

I have some express routers specified like so: const getFooRouter = Router().get('/foo', (_, res) => { res.json({ method: 'get', path: 'foo' }) }) const putFooRouter = Router().put('/foo', (_, res) => { res.json({ method: 'put', path: 'foo'…
Balázs Édes
  • 13,452
  • 6
  • 54
  • 89