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
3
votes
2 answers

angular OPTIONS http preflight on "Same Domain"?

I am currently confused about how angular's (jquery) preflight OPTIONS call is "selected" or chosen to perform before a request. I have a normal RESTful api call (api.domain.co) I have created a host entry 127.0.0.1 local.domain.co in my hosts…
3
votes
2 answers

Spring Data REST CORS - how to handle preflight OPTIONS request?

I'm using Spring Data REST to build a RESTful API. Until now my HTML GUI for this RESTful service was served from the same Tomcat and I had no problems wit Cross Origin requests. Now I want to serve the static files from a different server. This…
3
votes
1 answer

HTTP OPTIONS method blocked on osx (10.9.2)

I have issue with my mac. I can't send a http options request from my browser or using curl cmd. I don't have a clue why. It's not working for all users on my comp. I turned off the firewall and all unnecessary services but problem is still…
Marek Fajkus
  • 589
  • 4
  • 14
3
votes
2 answers

handle OPTIONS request with django's built in server

I am trying to make OPTIONS requests work with django but I am currently only getting 405. An answer I got here was that the server does not handle the OPTIONS request. This is the View that handles the request: from django.views.generic import…
McFarlane
  • 1,777
  • 2
  • 22
  • 39
3
votes
3 answers

ServiceStack returns 405 on OPTIONS request

I'm building a REST webservice using ServiceStack. I want to allow cross-domain request, so I registered the CorsFeature plugin. My AppHost looks as follows: public class HomeAppHost : AppHostHttpListenerBase { public Context Context { get;…
sroes
  • 14,663
  • 1
  • 53
  • 72
3
votes
0 answers

Using Apache HttpClient for an OPTIONS request

I am trying to use httpclient to verify if a specific endpoint is reachable. It seems that it is only possible to check if the server is up but cannot verify if the actual resource is available. Here is my code: HttpClient client = new Default…
2
votes
1 answer

How to send ‘OPTIONS * HTTP/1.1’ requests with the fetch() JavaScript API?

From RFC 9110, HTTP Semantics: An OPTIONS request with an asterisk ("*") as the request target (Section 7.1) applies to the server in general rather than to a specific resource. Since a server's communication options typically depend on the…
Géry Ogam
  • 6,336
  • 4
  • 38
  • 67
2
votes
1 answer

Cache OPTIONS - preflight request

I have an angular app that hits an azure functions backend. I want to cache cors OPTIONS requests to improve performance. After trying and failing several times I coded a quick example with a vanilla angular app and azure functions, there I tried…
Yoss
  • 428
  • 6
  • 16
2
votes
1 answer

CloudFront CORS failing for preflight/options calls

I've configured S3 with access only through CloudFront and protected with lambda. The problem is that I'm not able to access the files from SPA because of a failing preflight call. When testing this with Postman GET call returns an object with CORS…
2
votes
1 answer

Could REST API OPTIONS be used as the HATEOAS only request?

As I've understood it, REST MUST use the HATEOAS constraint to be implemented properly. My understanding of HATEOAS is that basically every resource should share information about what communication options it has and how the consumer can use those…
2
votes
2 answers

Angular 9: Unable to change or modify HTTP headers

My API server runs on Lumen framework and I have a CORS middleware installed there, accompanied with a middleware which manages JSON POST data. On the server side, everything is perfect. Now, for the UI, I use Angular 9 with Material layout. I have…
Zlatan Omerović
  • 3,863
  • 4
  • 39
  • 67
2
votes
3 answers

How to pass an Object Model (that has an Array of Objects Models in it) to API for insert as Params

i am new to angular, trying to make parameters of my object Model, whenever i stringify my object it makes a large string that API does not accept. What should i do..? here is the object that i want to convert to parameters. { …
Rehman
  • 23
  • 3
2
votes
1 answer

Headers disabled on web server

Our company maintains PCI compliance (along with a few others). As part of our most recent security audit it was determined by our infrastructure team and auditors that OPTIONS headers should be completely disabled as it posed a security threat. We…
ryanlifferth
  • 125
  • 1
  • 1
  • 6
2
votes
1 answer

How to examine api without documentation?

I have to use an API for my android app without any documentation. Before in my work I always had documentation, so this is a new situation for me. Backend developers said their api supports option requests. How to send option request? Using browser…
EricAll
  • 33
  • 1
  • 4
2
votes
2 answers

Use HTTP method 'OPTIONS' for custom usage?

I am working on a RESTful api. Now I categorize requests into get, modify and action. get uses GET modify uses POST, PUT, PATCH, DELETE action uses OPTIONS An example for action is OPTIONS /dogs/:id/feed, this will result in dog status changing…
bijiDango
  • 1,385
  • 3
  • 14
  • 28