Re: [cgi-devel] HTTP_RAW_POST_DATA
Status: Beta
Brought to you by:
drrngrvy
From: Darren G. <lis...@gm...> - 2011-04-11 18:40:35
|
Hi there, On 11 April 2011 18:42, <jc...@ol...> wrote: > Hello, > > I need to receive at an url like example.com/feedback an xml > that could be sent with something like: > echo '<doc><item>Some content.</item></doc>' | curl -X POST -H > 'Content-type: text/xml' -d @- http://example.com/feedback > > in php, that xml string is captured by $HTTP_RAW_POST_DATA > > in my program, I do something like this for each request > req.load(boost::fcgi::parse_all); > but then I am unable to find the xml string > How should I query req to get that xml? > The raw buffer is held in: std::string& raw_post_data = req.post_buffer(); I've been using a similar pattern to this recently - ie. XML passed around with the FastCGI protocol just being used as an efficient protocol... But, the library lacks the client-side code to make it really useful in this situation. It'd be good to support this type of use-case better. Suggestions in this area are most welcome. Cheers, Darren |