HTTPAPI too fast In the response to this question (www.scottklement.com/archives/ftpapu/200508/msg00067.html). Says to fix this problem add code similar to the following that runs before you call http_url_post (or post_raw, or post_xml, or whatever)
// wait up to 5 seconds for a 100-continue response: http_Set_100_timeout(5):
How do I do this in rpgle? Can you show me an example?
My program does the following.
C eval data = '' + C ' encoding="utf-8"?>' + C '<soap:Envelope xmlns' + C ':xsi="http://www.w3.org' + C '/2001/XMLSchema-instance" '+ C 'xmlns:xsd="http://www.w3.org'+ C '/2001/XMLSchema" xmlns:soap="http://' + Etc.
Then
c eval rc = http_persist_post( comm c : url c : 0 c : *NULL c : %addr(data) c : %len(%trimr(data)) c : 1 c : %paddr('INCOMING') c : 20 c : 'Mozilla/5.0 (X11; U; OS400)' c : 'text/xml' Etc.
The program sends & receives just fine, but it gets quite a few time-outs and has to resend a lot. It would save a lot of cycles if it did not have to do so many re-sends. Any help would be greatly appreciated.
Steve
|