[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ftpapi] http_string truncating payload?
Hi Jon,
According to the code maximun return length is 100000. This is the 1.40 version of httpapi.
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* HTTP_string(): Perform any HTTP request using short strings
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
P http_string B export
D PI 100000a varying
D Type 10a varying const
D URL 32767a varying const
D SendStr 100000a varying const
D options(*varsize:*omit:*nopass)
D ContentType 16384A varying const
D options(*varsize:*omit:*nopass)
D rc s 10i 0
D Output s 100000a varying
D msgText s 80a varying
D msgKey s 4a
D ct s like(ContentType)
/free
SetRespCode(0);
p_global = getGlobalPtr();
if %parms >= 4 and %addr(ContentType) <> *null;
ct = ContentType;
else;
ct = global.contentType;
endif;
if %parms >= 3 and %addr(SendStr) <> *null;
rc = http_req(Type: URL: *omit: Output: *omit: SendStr: ct );
else;
rc = http_req(Type: URL: *omit: Output);
endif;
if rc<>1 and (rc<200 or rc>299);
msgText = %trimr(http_error());
QMHSNDPM( 'CPF9897'
: 'QCPFMSG *LIBL'
: msgText
: %len(msgText)
: '*ESCAPE'
: '*'
: 1
: msgKey
: ApiEscape );
endif;
return Output;
/end-free
P e
--
No trees were killed in the sending of this message, but a large number of electrons were terribly upset.
Stefan Tageson
+46 732 369934
stefan@xxxxxxxxxx
On 1 July 2020 at 21:21:36 +02:00, Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:
I have a client using http_string who claims it is sending only 1,024 bytes to the web service. The proto says it is good for 1Mb.
I seem to recall reading before that one of the HTTP API methods only handle up to 1,024 but I can't find the reference so it may just be my ancient memory.
Does this ring a bell for anyone?
Jon Paris
--
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
--
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi