W3C home > Mailing lists > Public > www-lib@w3.org > April to June 2006

Post message to an URL

From: Raquel Vieira <raquel.vieira@ent.efacec.pt>
Date: Fri, 7 Apr 2006 16:12:23 +0100
Message-ID: <BA0FD0EA8282D74CAE2088A5DCB4474B1999B7@S005.maia.efacec.pt>
To: <www-lib@w3.org>


I'm trying to use libWWW to making an aplication in linux that send an
HTTP Post to an URL and get the server response. The server only
supports he HTTP/1.0 version.


I'm doing something like


HTProfile_newNoCacheClient("TesteApp", "1.0");


request = HTRequest_new();


dst = HTAnchor_findAddress("");            -> I
don't want the default http port (80) but the 8080 port. Can I do this?


string data = "<?xml version=\"1.0\"
xmlns=\"http://www.peek.se/DisplayML/\" version=\"1.12\"
template=\"FiguraComTexto\"><graphic region=\"Grafico\" name=
\"Figura1.xpm\" /><textField region= \"Texto\" align=\"left\" >RAQUEL
</textField><textField region=\"Time\"><time


src = HTTmpAnchor(NULL);


HTAnchor_setDocument(src, (char*)data.c_str());

HTAnchor_setFormat(src, WWW_PLAINTEXT);

HTAnchor_setLength(src, data.length());    t

status = HTPostAnchor(src, dst, request);


I don't know how can I get the response from the server.


Can anyone help me?


Thanks in advance,



Received on Friday, 7 April 2006 15:17:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:56 UTC