- From: Kevin L <kevl88@yahoo.com>
- Date: Wed, 13 Sep 2000 11:35:40 -0700 (PDT)
- To: Timo.Ross@ic3s.de
- Cc: www-lib@w3.org
Timo, Thanks again for the hint. From the documentation, HTPostFormAnchorToChunk() indeed can be used to post arbitrary data. I still have couple of questions, here's an sample XmlRpc request that I'm trying to send: POST /RPC2 HTTP/1.0 User-Agent: MyApp Host: myhost.domain.com Content-Type: text/xml Content-length: 181 <?xml version="1.0"?> <methodCall> <methodName>examples.getStateName</methodName> <params> <param> <value><i4>41</i4></value> </param> </params> </methodCall> * how do I set "Content-Type" to "text/xml" for the request? I've tried to set it with HTRequest_setConversion() on the request and HTAnchor_setFormat() on the anchor but to no avail; the form removes all request header and the latter doesn't seem to do anything, content-type stays as "application/x-www-form-urlencoded". * HTPostFormAnchorToChunk() expects data in an associated list, I have request payload as single string, so I need to convert it to a association/pair; should I store the payload as value and empty or some dummy string as name in the pair? Thanks in advance. Kevin --- Timo.Ross@ic3s.de wrote: > Hi! > The function you are looking for is "HTPostFormAnchorToChunk". In the first > parameter you give an associated list with the parameter value pairs of you > post. The replay will be load into a chunk! You will find this function in > the HTAccess module. > Hope this will help you. > Timo! > Kevin wrote: > Hi, > I'm trying to write a simple xml-Rpc client in C, I'm > pretty sure I can use libwww for this, but I couldn't > figure out the correct way to use it. > For people don't know Xml-Rpc, it is a RPC protocol > over HTTP with request being a HTTP-POST request and > reply a HTTP response, payload in request and reply > are in XML. > What I'm trying to do is use something like post > request payload in an anchor and return the reply > payload in chunk, is there something in > libwww can do this? > Let me know too if there's a complete different way to > achieve this? > TIA. > Kevin __________________________________________________ Do You Yahoo!? Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/
Received on Wednesday, 13 September 2000 14:35:43 UTC