[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: How to pass *nopass parameters.
Sender: "Calabro, Buck" <Buck.Calabro@xxxxxxxxxxxx>
>D http_url_post PR 10I 0
>D peURL 32767A varying const options(*varsize)
>D pePostData * value
>D pePostDataLen 10I 0 value
>D peFilename 32767A varying const options(*varsize)
>D peTimeout 10I 0 value options(*nopass)
>D peUserAgent 64A const options(*nopass)
>D peContentType 64A const options(*nopass)
>D peSOAPAction 64A const options(*nopass)
>
> I need to change de peContentType parameter,
> I try to call the procedure with *OMIT but
> yhe compiler doesn't let my.
Right. *OMIT is used with options(*omit). It is confusing, but *nopass means 'do not pass anything, not even *null or *omit.' Your call below should work for changing the content type.
>eval rc = http_url_post(
> 'HTTP://dm.pan-energy.com/edmslabs/' +
> 'pagepost.asp':
> %addr(data): %len(%trimr(data)):
> '/tmp/test_post_edms2.html' :
> 30 :
> 'http-api/1.0' :
> 'aplication/x-www-form-urlencoded')
>
> Is there any way to write the 4th and 5th
> parameter with a "default" ??.
You would have to change the procedure to allow options(*omit) on the file name and timeout, then add code to check to see if they were passed in by using %parms. If they weren't passed in, your code would supply the default values you desire.
--buck
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------