Mercurial > octave-nkf
comparison src/DLD-FUNCTIONS/urlwrite.cc @ 10840:89f4d7e294cc
Grammarcheck .cc files
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sat, 31 Jul 2010 11:18:11 -0700 |
parents | fb62fbbe28c0 |
children | b1ee705aef45 |
comparison
equal
deleted
inserted
replaced
10839:65bc065bec95 | 10840:89f4d7e294cc |
---|---|
680 } | 680 } |
681 #endif | 681 #endif |
682 | 682 |
683 DEFUN_DLD (urlwrite, args, nargout, | 683 DEFUN_DLD (urlwrite, args, nargout, |
684 "-*- texinfo -*-\n\ | 684 "-*- texinfo -*-\n\ |
685 @deftypefn {Loadable Function} {} urlwrite (@var{url}, @var{localfile})\n\ | 685 @deftypefn {Loadable Function} {} urlwrite (@var{url}, @var{localfile})\n\ |
686 @deftypefnx {Loadable Function} {@var{f} =} urlwrite (@var{url}, @var{localfile})\n\ | 686 @deftypefnx {Loadable Function} {@var{f} =} urlwrite (@var{url}, @var{localfile})\n\ |
687 @deftypefnx {Loadable Function} {[@var{f}, @var{success}] =} urlwrite (@var{url}, @var{localfile})\n\ | 687 @deftypefnx {Loadable Function} {[@var{f}, @var{success}] =} urlwrite (@var{url}, @var{localfile})\n\ |
688 @deftypefnx {Loadable Function} {[@var{f}, @var{success}, @var{message}] =} urlwrite (@var{url}, @var{localfile})\n\ | 688 @deftypefnx {Loadable Function} {[@var{f}, @var{success}, @var{message}] =} urlwrite (@var{url}, @var{localfile})\n\ |
689 Download a remote file specified by its @var{url} and save it as\n\ | 689 Download a remote file specified by its @var{url} and save it as\n\ |
690 @var{localfile}. For example,\n\ | 690 @var{localfile}. For example:\n\ |
691 \n\ | 691 \n\ |
692 @example\n\ | 692 @example\n\ |
693 @group\n\ | 693 @group\n\ |
694 urlwrite (\"ftp://ftp.octave.org/pub/octave/README\", \n\ | 694 urlwrite (\"ftp://ftp.octave.org/pub/octave/README\", \n\ |
695 \"README.txt\");\n\ | 695 \"README.txt\");\n\ |
846 return retval; | 846 return retval; |
847 } | 847 } |
848 | 848 |
849 DEFUN_DLD (urlread, args, nargout, | 849 DEFUN_DLD (urlread, args, nargout, |
850 "-*- texinfo -*-\n\ | 850 "-*- texinfo -*-\n\ |
851 @deftypefn {Loadable Function} {@var{s} =} urlread (@var{url})\n\ | 851 @deftypefn {Loadable Function} {@var{s} =} urlread (@var{url})\n\ |
852 @deftypefnx {Loadable Function} {[@var{s}, @var{success}] =} urlread (@var{url})\n\ | 852 @deftypefnx {Loadable Function} {[@var{s}, @var{success}] =} urlread (@var{url})\n\ |
853 @deftypefnx {Loadable Function} {[@var{s}, @var{success}, @var{message}] =} urlread (@var{url})\n\ | 853 @deftypefnx {Loadable Function} {[@var{s}, @var{success}, @var{message}] =} urlread (@var{url})\n\ |
854 @deftypefnx {Loadable Function} {[@dots{}] =} urlread (@var{url}, @var{method}, @var{param})\n\ | 854 @deftypefnx {Loadable Function} {[@dots{}] =} urlread (@var{url}, @var{method}, @var{param})\n\ |
855 Download a remote file specified by its @var{url} and return its content\n\ | 855 Download a remote file specified by its @var{url} and return its content\n\ |
856 in string @var{s}. For example,\n\ | 856 in string @var{s}. For example:\n\ |
857 \n\ | 857 \n\ |
858 @example\n\ | 858 @example\n\ |
859 s = urlread (\"ftp://ftp.octave.org/pub/octave/README\");\n\ | 859 s = urlread (\"ftp://ftp.octave.org/pub/octave/README\");\n\ |
860 @end example\n\ | 860 @end example\n\ |
861 \n\ | 861 \n\ |
864 message. If no output argument is specified and if an error occurs,\n\ | 864 message. If no output argument is specified and if an error occurs,\n\ |
865 then the error is signaled through Octave's error handling mechanism.\n\ | 865 then the error is signaled through Octave's error handling mechanism.\n\ |
866 \n\ | 866 \n\ |
867 This function uses libcurl. Curl supports, among others, the HTTP,\n\ | 867 This function uses libcurl. Curl supports, among others, the HTTP,\n\ |
868 FTP and FILE protocols. Username and password may be specified in the\n\ | 868 FTP and FILE protocols. Username and password may be specified in the\n\ |
869 URL. For example,\n\ | 869 URL@. For example:\n\ |
870 \n\ | 870 \n\ |
871 @example\n\ | 871 @example\n\ |
872 s = urlread (\"http://user:password@@example.com/file.txt\");\n\ | 872 s = urlread (\"http://user:password@@example.com/file.txt\");\n\ |
873 @end example\n\ | 873 @end example\n\ |
874 \n\ | 874 \n\ |
875 GET and POST requests can be specified by @var{method} and @var{param}.\n\ | 875 GET and POST requests can be specified by @var{method} and @var{param}.\n\ |
876 The parameter @var{method} is either @samp{get} or @samp{post}\n\ | 876 The parameter @var{method} is either @samp{get} or @samp{post}\n\ |
877 and @var{param} is a cell array of parameter and value pairs.\n\ | 877 and @var{param} is a cell array of parameter and value pairs.\n\ |
878 For example,\n\ | 878 For example:\n\ |
879 \n\ | 879 \n\ |
880 @example\n\ | 880 @example\n\ |
881 @group\n\ | 881 @group\n\ |
882 s = urlread (\"http://www.google.com/search\", \"get\",\n\ | 882 s = urlread (\"http://www.google.com/search\", \"get\",\n\ |
883 @{\"query\", \"octave\"@});\n\ | 883 @{\"query\", \"octave\"@});\n\ |
965 return retval; | 965 return retval; |
966 } | 966 } |
967 | 967 |
968 DEFUN_DLD (__ftp__, args, , | 968 DEFUN_DLD (__ftp__, args, , |
969 "-*- texinfo -*-\n\ | 969 "-*- texinfo -*-\n\ |
970 @deftypefn {Loadable Function} {} __ftp__ (@var{handle}, @var{host})\n\ | 970 @deftypefn {Loadable Function} {} __ftp__ (@var{handle}, @var{host})\n\ |
971 @deftypefnx {Loadable Function} {} __ftp__ (@var{handle}, @var{host}, @var{username}, @var{password})\n\ | 971 @deftypefnx {Loadable Function} {} __ftp__ (@var{handle}, @var{host}, @var{username}, @var{password})\n\ |
972 Undocumented internal function\n\ | 972 Undocumented internal function\n\ |
973 @end deftypefn") | 973 @end deftypefn") |
974 { | 974 { |
975 #ifdef HAVE_CURL | 975 #ifdef HAVE_CURL |