Reputation: 21
in our application we have a flex Client, this client uses BlazeDS and AMF to excute operation, Is there a way to add a custom Http header to the request sent from the AMF so i can read in our Filter in Java server Side
Thanks.
Upvotes: 0
Views: 122
Reputation: 670
You can use a custom header with anything you like in it, like this:
headers = [
new URLRequestHeader("contentType", "application/x-www-form-urlencoded"),
new URLRequestHeader("Accept-Language", "en_US"),
new URLRequestHeader("X-Authorization", "Bearer " + API_KEY)
];
Then use it like:
var urlReq:URLRequest = new URLRequest(API_URL);
urlReq.method = URLRequestMethod.GET;
urlReq.requestHeaders = headers;
var _jsonLoader:URLLoader = new URLLoader();
_jsonLoader.load(urlReq);
Upvotes: 0