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

Re: How to pass *nopass parameters.



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>


On Thu, 4 Nov 2004, [Windows-1252] Nicolás Machado wrote:
>
> I need to change de peContentType parameter, I try to call the procedure
> with *OMIT but yhe compiler doesn't let my.

Correct, you can't specify *OMIT.


> c                   eval      rc = http_url_post(
> c     1                       'HTTP://dm.pan-energy.com/edmslabs/' +
> c                               'pagepost.asp':
> c     2: 3                     %addr(data): %len(%trimr(data)):
> c     4                       '/tmp/test_post_edms2.html'     :
> c     5                       30 :
> c     6                       'http-api/1.0' :
> c     7                       'aplication/x-www-form-urlencoded')
>
> Is there any way to write the 4th and 5th parameter with a "default" ??.

(NOTE: You've mispelled the word 'application' in the last parameter)

Do you mean the 5th and 6th parameters?  The 4th parameter (as shown
above) is the path to the file you want to save in the IFS, there's no
default for that.

For the 5th, 6th and 7th parameters, the defaults are defined as constants
in the CONFIG_H member. That member is automatically /copy-ed into your
program by the /copy HTTPAPI_H that you have at the top of the code. So,
all you have to do is something like this:

     c                   eval      rc = http_url_post(
     c                              'http://dm.pan-energy.com/edmslabs/' +
     c                                  'pagepost.asp'
     c                             : %addr(data):
     c                             : %len(%trimr(data))
     c                             : '/tmp/test_post_edms2.html'
     c                             : HTTP_TIMEOUT
     c                             : HTTP_USERAGENT
     c                             : 'application/x-www-form-urlencoded')

If you want to also default the 7th parameter, the constant for that is
HTTP_CONTTYPE.

Good Luck!

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