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

How should I indicate that my HTTP server supports compressed requests?

I have been asked to reduce the bandwidth requirements for our app by compressing data that is sent to the server. I'm trying to do this transparently without changing the API, i.e. continuing to use the same URL and content type. I've found how to…
Mike Dimmick
  • 9,662
  • 2
  • 23
  • 48
1
vote
2 answers

Symfony 2 - Allow OPTIONS requests

I have a symfony 2 backend and I have installed it on a server. My frontend is an ionic PWA, so it runs in browser and it is also installed on that server, but with an other subdomain. When I send a request from the web app to the backend, I'm…
Nono
  • 1,073
  • 4
  • 23
  • 46
1
vote
1 answer

Why javascript fetch only making OPTIONS and not making further calls?

I am making AJAX request with javascript fetch, but it is only making OPTIONS call and not making further call. Weirdest thing is that the response header is just fine and $.ajax is working as expected. Here is the response header on OPTIONS…
João Silva
  • 101
  • 2
  • 4
1
vote
2 answers

Enabling the HTTP OPTIONS method on a JAX-WS based application

I have a simple JAX-WS application that is working fine via SOAP-UI, however due to the CORS restrictions in JavaScript, it is required that this application or my webserver respond to the http OPTIONS request. I have searched around and have not…
TheHOrse
  • 11
  • 4
1
vote
0 answers

Handling of Failure Status in HTTP OPTIONS - Ajax Call

I tried to find out the solution for one of the existing question Error Handling in HTTP Ajax Call using $fetch Javascript - I tried to reproduce the said scenario. I found the issue, that is the HTTP call triggers the HTTP OPTIONS method. Finally…
user7784919
1
vote
0 answers

Communication from JS (angular 4) to API-Server (avoid OPTIONS requests?)

I am building a SPA with Angular 4. As API-Backend I am using Node.js with Express.js Framework. I also configured WebSockets on my Backend-Server, so the same API-Server can establish WebSocket-connections. My current Problem: When I am doing "not…
lorado
  • 336
  • 1
  • 7
1
vote
1 answer

Spring Boot way of implementing the command HTTP OPTIONS with credentials in header

I am new to the Spring Boot, but I have worked with Java before on HTTP OPTIONS command. I am building a service method that takes in an URL and test that URL using HTTP OPTIONS command. Below is what I have written using Java: import…
pike
  • 671
  • 3
  • 9
  • 23
1
vote
1 answer

ERROR Angularjs + Lagom Framework

OPTIONS http://localhost:9000/api/chat/ 404 (Not Found) XMLHttpRequest cannot load http://localhost:9000/api/chat/. Response for preflight has invalid HTTP status code 404
1
vote
1 answer

How to send HTTP OPTIONS request with body using Spring rest template?

I am trying to call a RESTfull web service resource, this resource is provided by a third party, the resource is exposed with OPTIONS http verb. To integrate with the service, I should send a request with a specific body, which identities by a…
1
vote
0 answers

net::ERR_INCOMPLETE_CHUNKED_ENCODING with OPTIONS request

I'm using nginx (1.9.3) + php-fpm (via unix sockets) with another nginx as a reverse proxy. And rarely (1 out of ~100 requests) I get net::ERR_INCOMPLETE_CHUNKED_ENCODING during OPTIONS XHR request from one subdomain to another (cloud.example.com to…
chingis
  • 1,514
  • 2
  • 19
  • 38
1
vote
0 answers

Promise is rejecting OPTIONS request ? In which react life cycle method i should perform this operation

getAllOrganization: function() { return new Promise(function(resolve, reject) { request.fetch(latas.API_ENDPOINT.organizationApi).then(function(result) { if(result.status) { resolve(result.data);…
Kalashir
  • 1,099
  • 4
  • 15
  • 38
1
vote
1 answer

404 for OPTIONS method in Google AppEngine with Java and Angular.js

I am using Angular.js with AppEngine on Java. For every HTTP request, Angular.js issues an OPTIONS request before actual request, which returns an HTTP 404 error for me. Can anybody please tell me why? In AppEngine how to enable the configuration…
Harikrishnan
  • 3,664
  • 7
  • 48
  • 77
1
vote
1 answer

Error when testing PUT/POST methods of $resource using $httpBackend

I am having an issue where I am trying to test a service that has been set up using $resource, and has various methods GET, PUT, POST. I am using $httpBackend in my tests, and it works fine when testing the GET requests but fails on the PUT/POST - I…
1
vote
1 answer

What's the correct way to send parameters from AngularJS to an Options HTTP API?

What's the right code to talk between an options HTTP API with parameters? return $http( { method: 'OPTIONS', url: apiUrl + '/Options/' + clientID } ).error( function ( a, b, c, d, e ) { …
Pakk
  • 1,299
  • 2
  • 18
  • 36
1
vote
1 answer

ANGULARJS: "XMLHttpRequest cannot load http://localhost:62259/Service1.svc/getAllUsers. Invalid HTTP status code 405"

So, this is the situation: I am developing a web app with AngularJS (client-side) and C# (server-side); I have already some web services running well, with no problems (gelAllUsers, getOrderDetails, etc etc); After I implement the authentication…