shindig-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jasha Joachimsthal <>
Subject Make request with accept header
Date Sat, 05 Nov 2011 11:36:45 GMT

my gadget needs to fetch (XML) data from a server that requires an "Accept"
header with "application/xml".
I've set this header in my makeDOMRequest function:

function makeDOMRequest() {
    var params = {};
    params[] =;
    params[] =
{"Accept":"application/xml"};, response, params);

This function is called
by gadgets.util.registerOnLoadHandler(makeDOMRequest);

There is a function response(obj) that should create nice HTML from obj.
However obj.domdata is undefined.

DefaultRequestPipeline#execute is called twice. The first time the request
object doesn't have the request header "Accept: application/xml". The
second time it's called from MakeRequestHandler and with the correct header
in the request object. The second time the request isn't really executed
but its response is fetched from cache. The cache contains an empty
response body because the first request didn't send the header.

Is this a bug in Shindig or is there a way to make this work? I'm using
Shindig 3.0.0-beta2.

Jasha Joachimsthal

Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522 4466
US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll free)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message