Re: Post Anchor to Chunk?

Hi Kevin!

I think I understand your problem (-;
I think there is no complete function in LIBWWW that match on you problem
or I do not know this function, but there is always a way.
Please have a look to the souce code of the HTAccess module (HTAccess.c).
There you will find the source of the "HTPostFormAnchorToChunk" function.
This function calls the "HTPostFormAnchor" function. In this function you
can see, what has to be done for a post. There you can modify the parameter
of "HTAnchor_setDocument(postanchor, form_encoded);" and
"HTAnchor_setFormat(postanchor, WWW_FORM);" functions to your demands.

Hope this will help you ?!

Timo!




                                                                                                        
                    Kevin L                                                                             
                    <kevl88@yahoo        To:     Timo.Ross@ic3s.de                                      
                    .com>                cc:     www-lib@w3.org                                         
                                         Subject:     Re: Post Anchor to Chunk?                         
                    13.09.00                                                                            
                    20:35                                                                               
                                                                                                        
                                                                                                        




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 Friday, 15 September 2000 06:56:09 UTC