[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trying to grab a web page and write to IFS on iseries
As a side note, a complete list of redirection codes can be found here:
[1]http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
That list of status codes implies that is may not be save enough to
rely on the 302 code, only. I decided for me to test for 301, 302, 303
and 307 status codes because for me these codes seems to be the most
reasonable ones.
Thomas.
ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 15.02.2012 00:31:52:
> Von: Joel.Stone@xxxxxxxxxx
> An: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> Datum: 15.02.2012 06:15
> Betreff: trying to grab a web page and write to IFS on iseries
> Gesendet von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>
> Havent used HTTPAPI before. Have LIBHTTP10 (version 10).
>
> I compiled TEST1 (like EXAMPLE1 with a different URL) to retrieve a
> web page & copy to IFS.
>
> When I run, it displays
>
> call test1
> DSPLY HTTP/1.1 302 Found
>
> Message ID . . . . . . : RNQ5335
> Date sent . . . . . . : 02/14/12 Time sent . . . . . . :
17:25:22
>
> Message . . . . : DSPLY HTTP/1.1 302 Found
>
> Cause . . . . . : This is an inquiry message originated from RPG
procedure
> TEST1 in program LIBHTTP10/TEST1. The program is expecting a
character input
> field with a maximum length of 52.
> Recovery . . . : Enter a valid response according to the type of
data
> expected by the program. The program will tolerate five
incorrectresponses
> before signalling an error condition. There have been 0
incorrectresponses
> so far. If you do not want to enter any data, just press Enter to
resume
> processing of the program.
>
>
>
> The ifs file shows:
>
> <html><head><title>Object moved</title></head><body>
> <h2>Object moved to <a href="/temp/
> 8E23E11E22AF4F488E89FD27C76B4BC9.xml">here</a>.</h2>
> </body></html>
>
> Which is not correct.
>
>
> Any suggestions what I am doing incorrectly?
>
> Also, is there a command interface so I can do something like:
>
> GETWEBPAGE URL([2]www.yahoo.com<[3]http://www.yahoo.com>)
IFSFILE(tmp/filedownload)
>
>
> Thanks!!
>
>
>
______________________________________________________________________
> This outbound email has been scanned for all viruses by the
> MessageLabs Skyscan service.
> For more information please visit [4]http://www.symanteccloud.com
>
______________________________________________________________________-
----------------------------------------------------------------------
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> [5]http://www.scottklement.com/mailman/listinfo/ftpapi
>
-----------------------------------------------------------------------
--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying, distribution, or
reliance on any of it by anyone else is prohibited and may be a
criminal
offence. Please delete if obtained in error and email confirmation to
the sender.
References
1. http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
2. file://localhost/tmp/www.yahoo.com
3. http://www.yahoo.com/
4. http://www.symanteccloud.com/
5. 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
-----------------------------------------------------------------------