Search found 305 matches

by Scott Klement
Sun Nov 27, 2022 6:04 pm
Forum: HTTPAPI
Topic: DATA-GEN encountering RNX0355 error
Replies: 4
Views: 28

Re: DATA-GEN encountering RNX0355 error

Inside that ZIP file is an IBMi save file called YAJLLIB72.savf -- if you restore that to your IBM i it will contain all of the YAJL tools.

Read the README.txt file inside that ZIP file for details.
by Scott Klement
Fri Nov 25, 2022 2:40 pm
Forum: HTTPAPI
Topic: DATA-GEN encountering RNX0355 error
Replies: 4
Views: 28

Re: DATA-GEN encountering RNX0355 error

Is the YAJLDTAGEN program on your system? Is it in your library list? How about the service programs YAJLR4 and YAJL, are they there and in your library list?
by Scott Klement
Thu Nov 24, 2022 2:22 am
Forum: HTTPAPI
Topic: HTTPAPI Error for Ocp-Apim-Subscription-Key
Replies: 1
Views: 35

Re: HTTPAPI Error for Ocp-Apim-Subscription-Key

Either the server isn't running, or a firewall is blocking access, or you have the wrong URL, or something like that.

A header can't cause the connection to time out.
by Scott Klement
Mon Nov 07, 2022 3:33 am
Forum: HTTPAPI
Topic: Persistent connection
Replies: 3
Views: 198

Re: Persistent connection

You would need to provide your own subprocedure that puts the data into a string variable. Here's a simple example: **free Ctl-Opt DFTACTGRP(*NO) ACTGRP(*NEW) BNDDIR('HTTPAPI'); /define WEBFORMS /copy qrpglesrc,httpapi_h Dcl-C CRLF CONST(x'0D25'); Dcl-S rc Int(10); Dcl-S fromAddr Varchar(100); Dcl-S...
by Scott Klement
Thu Nov 03, 2022 11:45 pm
Forum: HTTPAPI
Topic: http_setAuth only supports 80 char username
Replies: 1
Views: 74

Re: http_setAuth only supports 80 char username

Currently, if you wanted to make it work with a user name longer than 80 characters, you'd have to do some custom coding. 1) Write a routine that combines the userid/password into a single string separated by a colon. For example "user:password" (without the quotes) 2) base64-encode the st...
by Scott Klement
Wed Nov 02, 2022 6:50 pm
Forum: HTTPAPI
Topic: HTTPAPI Timeout question
Replies: 3
Views: 87

Re: HTTPAPI Timeout question

I would prefer that people not use the old APIs like the one Jon posted for new applications. Instead, use http_req, http_stmf or http_string. http_setOption('timeout': '30'); // time out after 30 seconds rc = http_req(...parameters...); You mention the other system is "unavailable". The t...
by Scott Klement
Thu Oct 27, 2022 7:04 pm
Forum: RPG IV
Topic: Soft Enter and Function Keys Pressed
Replies: 4
Views: 91

Re: Soft Enter and Function Keys Pressed

What you can do is attach the display file to a data queue, and in the DDS record format put both FRCDTA and INVITE keywords. The RPG program will do a WRITE to the display file, causing the user to see the screen and be able to type. However, instead of calling READ, wait on the data queue. If the ...
by Scott Klement
Wed Oct 19, 2022 10:14 pm
Forum: HTTPAPI
Topic: Persistent connection
Replies: 3
Views: 198

Re: Persistent connection

You would need to change your code to call the following routines: http_persist_open(): This establishes the initial connection to the server that will persist. This returns a connection handle to the opened connection. http_persist_req(): This may be called many times (with a different URL each tim...
by Scott Klement
Tue Oct 18, 2022 7:33 pm
Forum: HTTPAPI
Topic: HTTPAPI Performance questions
Replies: 15
Views: 478

Re: HTTPAPI Performance questions

It's waiting for the data to arrive on the network.
by Scott Klement
Mon Oct 17, 2022 11:24 pm
Forum: HTTPAPI
Topic: HTTPAPI Performance questions
Replies: 15
Views: 478

Re: HTTPAPI Performance questions

This is what I see: 2022-10-17-10.57.49.000000: recvresp: reading response header, space left=32767 HTTP/1.1 200 OK 2022-10-17-10.57.53.295000: recvresp: reading response header, space left=32750 Cache-Control: no-cache So that is a more than 4 second wait time between the server sending you "O...