[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wget via HTTPAPI



Hi Jeff,

It really depends on what your contractor asks for...  but, it might be 
that simple, yes.

FWIW, the current BETA version of HTTPAPI (not the current release) has 
a CL command interface, so with that beta, you can do this from a CL 
program:

      HTTPAPI URL('http://whatever/whatever')
              DOWNLOAD('/tmp/myfile')

In the current release, you need to call it as an ILE procedure, this is 
a free format RPG example:

      rc = http_get( 'http://whatever/whatever
                   : '/tmp/myfile');
      if (rc <> 1);
          // handle error.
      endif;

But, hopefully it's that simple.  The possibility exists that the 
contractor is expecting you to use HTTP instead of FTP to send the files 
or something like that, and if that's the case, it might turn out to be 
something more.


Jeff Crosby wrote:
> HTTPAPI newbie, have used FTPAPI for some time.
> 
> Part of this was previously posted in the midrange mailing list.
> 
> A contractor is doing a website product search for us (not live yet).  I am
> creating the search files on the System I and FTPing them to our godaddy
> website.  I have this working.
> 
> The contractor says he will need a trigger of some sort to indicate the file
> uploads are complete.  He suggested wget.  The midrange.com archives suggest
> either geturi or httpapi can function as a wget.  Scott himself said httpapi
> could do it.
> 
> This list's archives contain this post from Scott in 2002:
> 
> <fromarchives>
> 
> Sender: Scott Klement <klemscot@xxxxxxxxxxxx>
> 
> Not that I know of.  It should be pretty easy to do, however.
> 
> What would be interesting would be something like a "wget" utility that
> incorporated both FTPAPI and HTTPAPI, and allowed you to just type a URL
> and get it.
> 
> Like maybe:
> 
>       fetch url('ftp://ftp.somewhere.com/pub/os400/something.savf')
> or
>       fetch url('http://www.foo.com/some/dir/somefile.dat')
> 
> </fromarchives>
> 
> Since this is from 2002, it's not exactly current.  I don't know what was in
> httpapi at that time.  I understand wget is used to retrieve website
> contents.  Isn't that what the httpapi procedure http_get does?  Does that
> mean all I need to do is http_get of the url my contractor ultimately gives
> me?  Is it really that simple?
> 
> Thanks.
> 
> --
> Jeff Crosby
> UniPro FoodService/Dilgard
> P.O. Box 13369
> Ft. Wayne, IN 46868-3369
> 260-422-7531
> www.dilgardfoods.com
> 
> The opinions expressed are my own and not necessarily the opinion of my
> company.  Unless I say so.
> 
> 
> 
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------