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
0
votes
0 answers

OPTIONS request is being sent instead of GET

I am sending a GET request via text/plain and the OPTIONS request is sent before that. Why is that so? xmlhttp.open("GET", url, true); xmlhttp.setRequestHeader("Content-Type", "text/plain"); xmlhttp.setRequestHeader("partner",…
user99999
  • 1,994
  • 5
  • 24
  • 45
0
votes
1 answer

Response for preflight has invalid HTTP status code 500 says

I have a web api in asp.net 4.5. I have installed nuget package for cors and made corresponding code changes in WebApiConfig.cs: public static void Register(HttpConfiguration config) { // Web API configuration and services …
0
votes
1 answer

Upload file avoiding HTTP OPTIONS

I have an OpenuI5 webapp with a backand developed with Delphi Datasnap technology. I use Upload Collection component to manage a list of fields https://openui5.hana.ondemand.com/explored.html#/entity/sap.m.UploadCollection/properties The component,…
padibro
  • 1,324
  • 10
  • 56
  • 95
0
votes
2 answers

Disabling choices on rest_framework's RelatedField

I'm using django rest framework version 3.3.2. We use HyperlinkedRelatedField in hundreds of different places, and my problem is that this inherits a choices method through RelatedField which does the following: class RelatedField(Field): …
wim
  • 338,267
  • 99
  • 616
  • 750
0
votes
2 answers

Spring MVC OPTIONS

I have a spring-boot 1.3.0-BUILD-SNAPSHOT w/SpringSecurity project and I am concerned about security of the REST endpoints. I have a CORS Filter defined: @Configuration public class CorsConfiguration { @Bean public WebMvcConfigurer…
sonoerin
  • 5,015
  • 23
  • 75
  • 132
0
votes
0 answers

OPTION Preflight to stackexchange api responds with BAD REQUEST

I've been banging my head against this all day. When trying to post to stackexchange from my webapp, I keep getting a 400 BAD REQUEST on my request. I've been using fiddler to try and spoof requests but I can't seem to get it to go through. Would…
0
votes
0 answers

jQuery cross-domain request

I am using a javascript library which triggers jQuery-ajax post request to send a file to a specified rest url. This works perfectly on the same damain, but when I change it to another server it executes an OPTIONS request. Whats wrong?
alsdkjasdlkja
  • 1,260
  • 2
  • 14
  • 30
0
votes
0 answers

How do I add the "Accept-Patch" header to my response to an OPTIONS request?

I am using Flask. I'm lost as to how to add an "Accept-Patch" response to any OPTIONS requests my server might get. Would it be something like this (I tried this and while it worked, I'm not sure if this is allowed): class MyViewMixin(MethodView): …
user2986242
  • 477
  • 1
  • 5
  • 19
0
votes
1 answer

POST request get fail with the browser OPTIONS preflight request

My Problem: The browser does not allow the request to be sent because of the OPTIONS request failure. The data sent with javascript and it looks like that: var params = "grant_type=password&username=" + username + "&password=" + password; …
Dvir
  • 3,287
  • 1
  • 21
  • 33
0
votes
1 answer

Are there any issues with using "501 Not Implemented" instead of a OPTIONS?

I have a set of REST services that all follow same URL/verb pattern. A few of those do not implement certain inessential combinations of URL/verb. Since the application using those services does not know in advance which operations are implemented,…
Andrey Shchekin
  • 21,101
  • 19
  • 94
  • 162
0
votes
1 answer

Missing detail in answer to HTTP-OPTION

I'm trying to find out the problem in a communication issue between my klient and a REST API. I can identify the problem but I'm not sure what is exactly missing in the answer for the OPTION request. My application is creating a HTTP POST what is…
gbaor
  • 1,419
  • 3
  • 11
  • 19
0
votes
1 answer

FireFox refuses response to OPTIONS

I have a page served by HTTP. Client code sends AJAX-requests for authorization to the same domain, but on HTTPS. (so it is CORS). FireFox generates this request: // domains and cookies are changed OPTIONS /auth/registration/json/info/…
0
votes
2 answers

Tomcat, HTTP, OPTIONS

Note: I am new to Tomcat... I am getting this message in the Tomcat localhost_access_log: 127.0.0.1 - - [09/Oct/2009:09:37:30 -0700] "OPTIONS /stl/foo HTTP/1.1" 200 - Can anyone explain to me where the OPTIONS comes from? I am using a 3rd party…
Greg
  • 59
  • 2
  • 4
-1
votes
1 answer

Why is the System.Web.Mvc.HttpVerbs class missing TRACE, CONNECT & OPTIONS?

The RFC 2616 HTTP/1.1 definition states that the following common HTTP methods exist: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT But the System.Web.Mvc.HttpVerbs enum is missing TRACE, OPTIONS & CONNECT. I've got an action filter which…
RPM1984
  • 72,246
  • 58
  • 225
  • 350
-1
votes
1 answer

Options request throws AssertionError error in Django REST Framework

I have the following Viewset: class My_ViewSet(viewsets.ModelViewSet): serializer_class = My_Serializer queryset = My_Object.objects.all() def list(self, request): # The code here is irrelevant return Response() def…
1 2 3
9
10