Theo Kouwenhoven
asked on
LIBHTTP Post result
Hi experts,
I use LIBHTTP to call a restservice (POST)
On this moment I use :
what do I have to change to accomplish that?
I use LIBHTTP to call a restservice (POST)
On this moment I use :
http_post(URL
: %addr(myJSON:*data )
: %len(%trim(myJSON))
: '/home/user/result.dta'
: HTTP_TIMEOUT
: HTTP_USERAGENT
: 'application/json' );
The result is written to a resultfile, I prefer to get the result in a variable in the program,what do I have to change to accomplish that?
ASKER
Hi David,
Oke that is what I fond until now, I hoped there were some features I didn't discover.
Curl on iSeries?
is that a Qshell program?
standard or do I have to install that?
Oke that is what I fond until now, I hoped there were some features I didn't discover.
Curl on iSeries?
is that a Qshell program?
standard or do I have to install that?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
CURL seems to be a nice option, but not flexible enough.
I need the possibility to send a (large) IFS file and not in a 72K commandline.
I need the possibility to send a (large) IFS file and not in a 72K commandline.
As usual, IBM docs seem to leave out 99% of what's required to get their code to work.
Looks like you must register a function as a callback to use data, rather than output to a file.
Seems like a massive amount of overkill. You may be better off just making a callout to a command line tool, like curl, so your POST processing is synchronous/inlined rather than callback based.
Or you can always attempt to understand IBM's docs about how to build your callback to do asynchronous processing of your data.
Tip: Because IBM docs are so... barely understandable... Best you actually post a link to docs for http_post() you're using, as it's unclear I was even reading the correct docs.