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

Re: http_url_post_raw



Hi Billy,

On 3/9/2012 1:04 PM, Billy Terpstra wrote:
> Okay don't laugh, I am trying to send a file via [1]https:// from the
> iSeries without using the IFS.

If you're not using the IFS, what are you using?  Are you generating the 
data somehow in your program?  Or do you mean that you're using a 
physical file instead of a stream file?

> Please point me to an example that I can use as I do not understand
> how Example 5 would do the following.

In HTTPAPI versions 1.23 and earlier, EXAMPLE5 was a very bad example of 
how to call UPS's package tracking web service.  It did not upload a 
multipart form-data file.

In HTTPAPI versions 1.24 upward, EXAMPLE5 is a simple example of a 
download, intending to demonstrate how to send a userid/password to a 
web site.

EXAMPLE5 doesn't do what you're trying to do.  And it never will. 
Because that's not what it's for.

> I do understand the record portion, it's the header portion which is
> highlighted that is giving me heart burn.  A nudge would be helpful.
> (Oh that's not a real authorization code.)

Which portion is the "record" portion?  HTTP has a request header, 
request body, response header and response body.

The example you posted (I've omitted it here for brevity) appears to be 
a multipart/form-data file, so it'd be created using the MFD encoders. 
Except that they expect their input to either come from a variable or a 
stream file.  And I'm not clear on which one you want...    or are you 
looking to extend HTTPAPI to add support for MFD encoding of physical 
file data?

The data you show doesn't look like physical file data, though... it 
looks like a CSV file, which is normally not stored in a PF.

So... you have these options:

1) Copy your CSV data to a stream file (though I realize, I'm just 
assuming that's what you mean by "no IFS") and use the HTTPAPI routines 
(http_mfd_encoder_open, http_mfd_encoder_addstmf, http_mfd_encoder_close)

2) Write your own multipart/form-data encoder routines that support PFs.

3) Extend HTTPAPI to support PFs by adding an http_mfd_encoder_addpf 
routine.

But, be warned that the existing http_mfd_encoder_xxx routines use the 
forbidden IFS, so you might want to avoid them?  depending on why you're 
avoiding the IFS...?

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