Forum Home » Fuse Distributions » Fuse Services Framework

Thread: Http Method OPTIONS headers

 
This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Last Post: Jan 31, 2012 8:31 AM Last Post By: michal.warecki
michal.warecki

Posts: 49
Registered: 01/23/11
Http Method OPTIONS headers
Posted: Nov 13, 2011 4:35 PM
 
  Click to reply to this thread Reply
Hi,

Is it a way to set http headers in OPTIONS method? I want to make cross domain ajax request and browser first request web-service with OPTIONS method and next with GET or POST. Browser requires Access-Control-Allow-Origin header in OPTIONS response so I have to set it.
Is it possible to configure it with CXF or rather with Jetty?
I'm using cxf with Fuse ESB.

Thx
michal.warecki

Posts: 49
Registered: 01/23/11
Re: Http Method OPTIONS headers
Posted: Nov 13, 2011 5:05 PM   in response to: michal.warecki in response to: michal.warecki
 
  Click to reply to this thread Reply
Problem is solved. There is OPTIONS annotation. Unfortunately I don't know if there is a way to set wildcard in Path so I have to create methods for each method that accepts preflighted request.
ask4ralph

Posts: 3
Registered: 09/12/11
Re: Http Method OPTIONS headers
Posted: Nov 25, 2011 11:01 AM   in response to: michal.warecki in response to: michal.warecki
 
  Click to reply to this thread Reply
Hi michal,

I have a similar problem, what do you mean by "There is OPTIONS annotation"
michal.warecki

Posts: 49
Registered: 01/23/11
Re: Http Method OPTIONS headers
Posted: Jan 31, 2012 8:31 AM   in response to: ask4ralph in response to: ask4ralph
 
  Click to reply to this thread Reply
http://docs.oracle.com/javaee/6/api/javax/ws/rs/OPTIONS.html

Regards,
Michal

Edited by: michal.warecki on Jan 31, 2012 8:31 AM