Mercurial > hg > octave-nkf
diff libinterp/corefcn/urlwrite.cc @ 17596:43b9181340fb
separate object creation from http actions in url_transfer class
* url-transfer.h, url-transfer.cc: New functions for http GET and POST
actions. Don't perform action in URL constructor. Keep track of FTP
vs. HTTP object type.
* urlwrite.cc: Update to match.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 07 Oct 2013 23:15:06 -0400 |
parents | 9e8a9f043944 |
children | d63878346099 |
line wrap: on
line diff
--- a/libinterp/corefcn/urlwrite.cc +++ b/libinterp/corefcn/urlwrite.cc @@ -410,7 +410,9 @@ frame.add_fcn (delete_file, filename); - url_transfer curl = url_transfer (url, method, param, ofile); + url_transfer curl = url_transfer (url, ofile); + + curl.http_action (param, method); ofile.close (); @@ -535,7 +537,9 @@ std::ostringstream buf; - url_transfer curl = url_transfer (url, method, param, buf); + url_transfer curl = url_transfer (url, buf); + + curl.http_action (param, method); if (curl.good ()) {