Hi Scott, This has gotten more confusing now as this program has all your comments on top. This may not be related to HTTPAPI project but definitely some other project that you did and someone copied into HTTPAPI library on our box for usage. I emailed that program from the client site and it will take a day for me to get it. I will share the program when I get it on my email. As I said, this program is what we use as part of our call to credit card settlement process and get a response back on it from the provider side and for some weeks getting a response which is not correct in some way and most orders gets
settled on the provider side but showing error on our side due to response codes we are getting. Snippet of the program here, which is customized from your original code. Dates show from 2008: ******************************************************************************** *
* Copyright (c) 2001-2007 Scott C. Klement
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ''AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * * SUCH DAMAGE. * * * ********************************************************************************************** H DFTACTGRP(*NO) ACTGRP(*NEW) BNDDIR('HTTPAPI') ********************************************************************************************** * * D/copy op_libhttp/qrpglesrc,httpapi_h
* * ********************************************************************************************** * Prototype for incoming http response data * ********************************************************************************************** D incoming PR 10I 0 D descriptor 10I 0 value
D data 8192A options(*varsize)
D datalen 10I 0 value
* * ********************************************************************************************** * general use fields * ********************************************************************************************** D rc s 10I 0 return code
D msg s 52A message text
D CRLF C CONST(x'0d25') CR - LF
D data S 2048A data to send to URL D retdata S 32766A data returned from
D retlen S 10I 0 returned data len
D nextpos S 10I 0 inz(1) next position
* prototype parameters * D peURL s 1024 entry:send to URL
D peTimeout s 10I 0 entry:wait seconds
D peContentType s 64 entry:content type
* snddtaq parms * d dqName s 10 dtaq data length
d dqLibr s 10 dtaq data length
d dqKeyLen s 3 0 dtaq data length
d dqKey s 10 dtaq data length
d dqLen s 5 0 dtaq data length
d dqData s 2048 dtaq data
* entry parameters * D eURL s 1024 entry:send to URL
D eData s 2048 entry:data to send
D eTimeout s 10I 0 entry:wait seconds
D eContentType s 64 entry:content type
D eAsciiCvt s 1 entry:Cvt to ASCII
D eRetData s 2048 entry:Returned data
D eErrFlag s 1 Rtrn:Error flag
* * * PROGRAM INFORMATION DATA STRUCTURE, OTHER FIELDS ARE AVAILABLE * ********************************************************************************************** D SDS * D daWSID 244 253 * D daUser 10 * * * * * *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * * http_url_post_raw(): Post data to CGI script and get document * * * * peURL = url to post to (http://www.blah.com/cgi-bin/etc) * * pePostData = pointer to data to post to CGI script. * * pePostDataLen = length of data to post to CGI script. * * peFD = FD to pass back to peProc * * peProc = procedure to call each time data is received. * * peTimeout = (optional) give up if no data is received for * * this many seconds. * * peUserAgent = (optional) User-Agent string passed to the * * server. Pass the named constant HTTP_USERAGENT * * if you want to get the default value. * * peContentType = (optional) content type to supply (mainly * * useful when talking to CGI scripts) * * peSOAPAction = (optional) string used to specify the action * * taken by some SOAP applications. * * * * Returns (same as http_url_post) * * * *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * * http_url_post_raw... * * PR 10I 0 * * peURL 32767A varying const options(*varsize) * * pePostData * value * * pePostDataLen 10I 0 value * * peFD 10I 0 value * * peProc * value procptr * * peTimeout 10I 0 value options(*nopass) * * peUserAgent 64A const options(*nopass:*omit) * * peContentType 64A const options(*nopass:*omit) * * peSOAPAction 64A const options(*nopass:*omit) * * * * * ****************************************************** * * Entry parameter * c *ENTRY plist
c parm eURL
c parm eData
c parm eTimeout
c parm eContentType
c parm eAsciiCvt entry:Cvt to ASCII
* result parms * c parm eRetData out: data received
c parm eErrFlag out: error flag
* * ****************************************************** * * MAINLINE * * ****************************************************** * * * ****************************************************** * * Initialize * ****************************************************** * c clear eRetData
c clear eErrFlag
* * * blank out entry parms if beginning of fields are empty * c if %subst(eURL:1:10) = *blanks entry:send to URL
c clear eURL
c end
c if %subst(eData:1:10) = *blanks entry:data to send
c clear eData
c end
c if %subst(eContentType:1:10) = *blanks entry:content type
c clear eContentType
.. . . . . . . . If this could help you or team remember anything about it. Thanks Farhan From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
On Behalf Of Scott Klement Hello Farhan, HTTPAPI does not have an interface like the code example you've posted. You cannot access it via CALL/PARM like that. Are you certain that you are using HTTPAPI? This code doesn't look familiar at all. -SK On 10/28/2020 5:21 AM, Farhan Qadri wrote:
|
-- _______________________________________________ Ftpapi mailing list Ftpapi@xxxxxxxxxxxxxxxxxxxxxx http://scottklement.com/mailman/listinfo/ftpapi