On 05/17/2013 05:20 PM, Peter Sparkes wrote: > Hi > > I have an application in which I require to send a POST request from > the server to another non Cocoon website ( to set parameters for a > newsletter which uses phplist newsletter software) and the response > would be in JSON
Highly depends on your underlying usecase what to do with the response and further the cocoon version you are using. I lately use the REST-way in c3 but you can post anything with cinclude in 2.1.x like: <cinclude:includexml> <cinclude:src>http://10.231.27.63/sql_templates/</cinclude:src> <cinclude:configuration> <cinclude:parameter> <cinclude:name>method</cinclude:name> <cinclude:value>POST</cinclude:value> </cinclude:parameter> </cinclude:configuration> <cinclude:parameters> <cinclude:parameter> <cinclude:name>text</cinclude:name> <cinclude:value> <ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <sql:xpath-query xmlns:lsa="blah" mapping-schema="schema/address.xsd">(/lsa:Address)</sql:xpath-query> </ROOT> </cinclude:value> </cinclude:parameter> </cinclude:parameters> </cinclude:includexml> as described in http://mail-archives.apache.org/mod_mbox/cocoon-users/200512.mbox/%3c06b403677c41d51194550002a55107d2057b8...@s5-stf1-r1.nrn.nrcan.gc.ca%3E > > This would be server to server without any client browser being involved Actually if I understand your usecase that is not 100% needed. The user has the newsletter form generated by cocoon and the result has to go to the php server. IF the php is reachable form the "outside" then a simple javascript would do to treat the response. If not I recommend a httpd in front and there just proxy/rewrite the request to the different server. salu2 > > How do I do this? > > Help please > > Peter > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org > For additional commands, e-mail: users-h...@cocoon.apache.org > -- Thorsten Scherler <scherler.at.gmail.com> codeBusters S.L. - web based systems <consulting, training and solutions> http://www.codebusters.es/ --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org