Re: HTPostAnchor
Steinar Bang <[email protected]> Thu, 27 May 2004 11:15:40 +0200
| Newsgroups | gmane.comp.lib.libwww |
|---|---|
| Organization | Probably a good idea |
| Message-ID | <[email protected]> |
>>>>> "Michnowicz, Simon G" <[email protected]>: > I am trying to use wwwlib to do a file upload to a server, using the > POST method, from a C program. [snip!] > The only way I could seem to find to do it is to use > HTPostAnchor (HTParentAnchor *source, HTAnchor *dest, HTRequest *request); > and to directly modify the headers of HTParentAnchor to manually > create the MIME headers with HTAnchor_setDocument() > Is this the best way to do it? It seems rather clunky.. It's what I do. Ie. I do this to be able to send a multipart/form-data body, instead of the old-style form coding supported by libwww. I use PUT and HTPutAnchor() to do uploads to the server.