From: Dean M. B. <mik...@gm...> - 2010-12-03 03:24:45
|
On Fri, Dec 3, 2010 at 11:04 AM, Raindog <ra...@ma...> wrote: > "Dean Michael Berris" <mik...@gm...> wrote: >> >>Actually this isn't an HTTP POST, but rather an HTTP GET request with >>the query parameter supplied. This would work for what you intend to >>do: >> >> http::client client; >> http::client::request >>request("http://www.mysite.com/site.cgi?foo=bar&baz=quid"); >> http::client::response response = client.get(request); >> >>HTH >> > > I realize now that after your response that I need also to send a file, I am trying essentially to fill out a web form w/ a file upload element, along with some options, hence why I thought it was a POST. I apologize for not being clear > Re-arranging your response for posterity. ;) So even in that situation, instead of using 'client.get' you can use 'client.post', and then put the file contents as part of the request. This isn't easily supported at the moment because the client requires that the contents be in a string. If your file is large (multiple megabytes) it is an issue and I'm going to address that limitation in the coming 0.9 release. Let me know if you need any more information regarding how to make the file contents part of the POST request. -- Dean Michael Berris deanberris.com |