Search found 210 matches
- Thu Feb 22, 2024 8:54 pm
- Forum: YAJL-ILE
- Topic: JSONWEBSRV.sqlrpgle
- Replies: 26
- Views: 4857
Re: JSONWEBSRV.sqlrpgle
Why do you think you need Apache to be running? As I pointed out earlier, Scott's JSONWEBSRV example is a SERVER application - and it needs Apache or NGINX to be running. IF you were trying to run Scott's program they Yes - Apache would need to be configured and running. But if you are UPLOADING fil...
- Thu Feb 22, 2024 4:44 pm
- Forum: YAJL-ILE
- Topic: JSONWEBSRV.sqlrpgle
- Replies: 26
- Views: 4857
Re: JSONWEBSRV.sqlrpgle
Which is fine - but why did you think that JSONWEBSRV would be a useful reference? As I tried to explain it is an example of _supplying_ a web service. Not _consumming_ one which is what you are trying to do. Normally I would use HTTPAPI to send the file (Scott has examples in LIBHTTP of file upload...
- Wed Feb 21, 2024 11:24 pm
- Forum: YAJL-ILE
- Topic: JSONWEBSRV.sqlrpgle
- Replies: 26
- Views: 4857
Re: JSONWEBSRV.sqlrpgle
You may have misunderstood the use of getenv(). The text 'REQUEST_URI' is a literal and asks that the URI from which the request originated be retrieved. You cannot use it to specify an arbitrary URI (in your case www.tiktok.com) - it wouldn't know what to do with it. getenv is used to retrieve info...
- Mon Feb 19, 2024 11:59 pm
- Forum: HTTPAPI
- Topic: Using Oauth2 with HTTPAPI
- Replies: 8
- Views: 4417
Re: Using Oauth2 with HTTPAPI
Glad it was useful to you. 1) For the token it has to be a POST. In fact if you try the URL you were given in a browser it will tell you that POST is required. 2) I didn't notice it either but I checked in the source code of the latest version and it was there. Not sure when it was added but I had j...
- Mon Feb 19, 2024 8:59 pm
- Forum: HTTPAPI
- Topic: Using Oauth2 with HTTPAPI
- Replies: 8
- Views: 4417
Re: Using Oauth2 with HTTPAPI
It looks like a server-server setup and somewhat similar to mine but I don't have to mess with form-encoding. Luckily HTTPAPI has that feature available although I've never needed to use it. There is at least one example that uses it in the LIBHTTP RPG sources. Scott is WAY more knowledgeable than m...
- Mon Feb 19, 2024 7:19 pm
- Forum: HTTPAPI
- Topic: Using Oauth2 with HTTPAPI
- Replies: 8
- Views: 4417
Re: Using Oauth2 with HTTPAPI
I have just finished working on this as Zoom has changed their APIs to use OAUTH2 instead of JWTs. For use by tools such as HTTPAPI Zoom has implemented a Server-Server application interface which is much easier to use than the call-back mechanism that some OAUTH2 users require. I would check with y...
- Sun Feb 04, 2024 7:04 pm
- Forum: RPG IV
- Topic: %DIFF Issue Utilizing Milliseconds
- Replies: 1
- Views: 2774
Re: %DIFF Issue Utilizing Milliseconds
You appear to be confusing milliseconds and microseconds. %Diff using *MSECONDS gives _ micro seconds_ not milliseconds. So dividing by 1,000,000 is correct. Two other points. First - if you want seconds then why not ask %Diff for seconds to begin with? If you want decimals of seconds you can specif...
- Fri Feb 02, 2024 4:29 pm
- Forum: YAJL-ILE
- Topic: DATA-INTO to parse json response
- Replies: 3
- Views: 3430
Re: DATA-INTO to parse json response
At first glance the easiest way to handle this would be to use countprefix. You have specified this but have not declared the relevant variable in the DS. You need to code something like this: dcl-ds Data qualified; status char(25); errmsg char(100); num_InvoiceData int(5); // Add this definition dc...
- Wed Jan 10, 2024 7:35 pm
- Forum: YAJL-ILE
- Topic: YAJL function for deleting node
- Replies: 2
- Views: 2781
Re: YAJL function for deleting node
Directly within RPG your only option would be to use DATA-INTO with YAJLINTO to read the json, then copy only the required portions to a new DS and use DATA-GEN with YAJLGEN to regenerate the json. It is possible that you could achieve this without the use of a second DS by utilizing countprefix and...
- Wed Nov 29, 2023 4:43 pm
- Forum: YAJL-ILE
- Topic: YAJL lexical error: invalid character inside string
- Replies: 4
- Views: 9423
Re: YAJL lexical error: invalid character inside string
Well they are not "invalid". They appear to be escape characters. In JSON any character that has special meaning must be escaped if it is part of the data. For example this: In json special characters, such as " must be escaped Would have to be represented as: In json special characte...