0

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
  • read about CORS http://www.html5rocks.com/en/tutorials/cors/ – Akki619 Aug 26 '15 at 06:57
  • 1
    Nothing's wrong ...that's how CORS works. OPTIONS is a preflight request to make sure the api is cors enabled before making the full request – charlietfl Aug 26 '15 at 06:57
  • one of the option is enable API for cross domain request if you have control over it or write a wrapper in between. – Akki619 Aug 26 '15 at 07:08
  • Schön, liefere jetzt generell ein Allow-Origin * aus. Das bekommt der OPTIONS call auch zurück. Und wie kann man den POST dann ausführen? Kann ich auf der jquery Antwort dann irgendwie sagen antwort.tuEndlichDasWasDuMachenSolltest!() ? ;) – alsdkjasdlkja Aug 26 '15 at 09:32

0 Answers0