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

RE: Try to get HttpApi to work on V4R3



Sender: Scott Klement <klemscot@xxxxxxxxxxxx>


On Wed, 30 Oct 2002, Art Tostaine, Jr. wrote:
>
> I was going to start trying to test this on my V4R5 machine.  How do I
> modify example 4 so that I can loop and send chunks of data?


To remove the SSL code from EXAMPLE4 (so that it works on V4R3) you
should remove these lines:

0022.00 c                   eval      rc = https_init(APP_ID)
0023.00
0024.00 c                   if        rc < 0
0025.00 c                   eval      msg = http_error(rc)
0026.00 c                   if        rc = HTTP_NOTREG
0027.00 c                   exsr      RegisterMe
0028.00 c                   return
0029.00 c                   else
0030.00 c                   dsply                   msg
0031.00 c                   return
0032.00 c                   endif
0033.00 c                   endif

And change 'https://' to 'http://'

>
> It looks like I'm supposed to fill Data and then use Http_Url_Post, but
> that uses the Http: address everytime.  I think what I want
> to do is use one Http_Url_Post, and then some other API to continue
> looping my file and sending all of the records.
>
> Is that right?
>

I didn't create the capability of sending "chunked" data on a post
operation in HTTPAPI.  That would only be necessary if the data to
send is REALLY large (I haven't yet had a need for that)

How big is the file that you're sending?

If the data is really large, what I'd do as a workaround is copy the
data into a user-space object.   Get a pointer to that user space, and
pass that instead of 'data' to http_url_post.   That way, you can send up
to 16gb...

If the data is expected to be small, I'd simply load it into a variable.

If it's something that'd be really useful, I could add a new procedure
to HTTPAPI that allowed the name of a stream file to post, in the same
manner as the data you receive as responses...

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------