HTTPAPI also comes with a simple use command LIBHTTP/HTTPAPI. I use this to connect to a vendor get a document but it also does post actions.

-Matt


-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of gio.cot via RPG400-L
Sent: Tuesday, September 14, 2021 4:37 PM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Cc: gio.cot <gio.cot@xxxxxxxxxxx>
Subject: RE: Help with SYSTOOLS.HTTPPOSTCLOB

Hi Chris , many thanks for your reply

I will try with HTTAPI ..



Just for curiosity as in the maintime i was triyng with HTTPPOSTCLOB , the following code could be Ok ?



Dcl-S gData SQLTYPE(CLOB:2000);

Dcl-Ds Request Qualified;

URL Char(128);

Head Char(1024);

Body Char(1024);

End-Ds;



Request.URL = <https://urldefense.com/v3/__https://www.google.com/__;!!O6xM9Yim9Yk!pCGp1TAy_pGvDN1FU8cy919G9NnZG_t8VtfsQxZCa4JturIsPvCUhveOYaM6D8l5VlTF$ > https://urldefense.com/v3/__https://www.google.com/__;!!O6xM9Yim9Yk!pCGp1TAy_pGvDN1FU8cy919G9NnZG_t8VtfsQxZCa4JturIsPvCUhveOYaM6D8l5VlTF$ ';

Request.Head = '<httpHeader>' +

'<header name="Content-Type"
value="application/json"/>' +

'</httpHeader>';



Request.Body = '/tmp/filename.zip' ;



EXEC SQL SET :gData

= SYSTOOLS.HTTPPOSTCLOB( :Request.URL, :Request.Head, :Request.Body );

*Inlr = *On;



If ever, could you please post the RPG code, how to run your suggestion :



VALUES SYSTOOLS.HTTPPOSTBLOB(
URL=>' <https://urldefense.com/v3/__https://www.google.com/__;!!O6xM9Yim9Yk!pCGp1TAy_pGvDN1FU8cy919G9NnZG_t8VtfsQxZCa4JturIsPvCUhveOYaM6D8l5VlTF$ > https://urldefense.com/v3/__https://www.google.com/__;!!O6xM9Yim9Yk!pCGp1TAy_pGvDN1FU8cy919G9NnZG_t8VtfsQxZCa4JturIsPvCUhveOYaM6D8l5VlTF$ '
, HTTPHEADER=>''
, REQUESTMSG=> GET_BLOB_FROM_FILE( '/tmp/filename.zip')
) ;



i can't figure how to insert these in a rpg source

Thanks in advance

G

--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://urldefense.com/v3/__https://lists.midrange.com/mailman/listinfo/rpg400-l__;!!O6xM9Yim9Yk!pCGp1TAy_pGvDN1FU8cy919G9NnZG_t8VtfsQxZCa4JturIsPvCUhveOYaM6DxBquejW$
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://urldefense.com/v3/__https://archive.midrange.com/rpg400-l__;!!O6xM9Yim9Yk!pCGp1TAy_pGvDN1FU8cy919G9NnZG_t8VtfsQxZCa4JturIsPvCUhveOYaM6D3XXi3EO$ .

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://urldefense.com/v3/__https://amazon.midrange.com__;!!O6xM9Yim9Yk!pCGp1TAy_pGvDN1FU8cy919G9NnZG_t8VtfsQxZCa4JturIsPvCUhveOYaM6D77hBRia$

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.