You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marcus Bointon <ma...@synchromedia.co.uk> on 2007/03/13 16:30:14 UTC

Setting Accept header in flood

I'm using flood to test a REST-style interface. The server uses the  
Accept header to tell which kind of return value should be used -  
e.g. text/html will return an interactive web interface, and text/xml  
will return XML. In order to test the xml interface I need to be able  
to set the accept header on requests that flood makes. There doesn't  
seem to be an option in the flood config file to set this. Have I  
missed something, or do I need to hack in the source to make flood  
add this header? If I need to change the source, where should I be  
looking for that part of the request creation? (C is not really my  
thing).

Thanks,

Marcus
-- 
Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
UK resellers of info@hand CRM solutions
marcus@synchromedia.co.uk | http://www.synchromedia.co.uk/



Re: Setting Accept header in flood

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On 3/13/07, Marcus Bointon <ma...@synchromedia.co.uk> wrote:
> On 13 Mar 2007, at 15:39, Justin Erenkrantz wrote:
>
> > It's already there - set the 'extraheader' attribute in the URL.
> > Like so:
> >
> > --
> > <url extraheader="Accept=text/xml">http://www.example.com/</url>
>
> Excellent, thanks.

Ergh, note that you might want it to be: "Accept: text/xml" - no
equals as the colon is the HTTP delimiter.  =P  -- justin

Re: Setting Accept header in flood

Posted by Marcus Bointon <ma...@synchromedia.co.uk>.
On 13 Mar 2007, at 15:39, Justin Erenkrantz wrote:

> It's already there - set the 'extraheader' attribute in the URL.   
> Like so:
>
> --
> <url extraheader="Accept=text/xml">http://www.example.com/</url>

Excellent, thanks.

Marcus
-- 
Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
UK resellers of info@hand CRM solutions
marcus@synchromedia.co.uk | http://www.synchromedia.co.uk/



Re: Setting Accept header in flood

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On 3/13/07, Marcus Bointon <ma...@synchromedia.co.uk> wrote:
> I'm using flood to test a REST-style interface. The server uses the
> Accept header to tell which kind of return value should be used -
> e.g. text/html will return an interactive web interface, and text/xml
> will return XML. In order to test the xml interface I need to be able
> to set the accept header on requests that flood makes. There doesn't
> seem to be an option in the flood config file to set this. Have I
> missed something, or do I need to hack in the source to make flood
> add this header? If I need to change the source, where should I be
> looking for that part of the request creation? (C is not really my
> thing).

It's already there - set the 'extraheader' attribute in the URL.  Like so:

--
<url extraheader="Accept=text/xml">http://www.example.com/</url>
--

HTH.  -- justin