Search found 249 matches

by jonboy49
Wed Jul 03, 2024 9:40 pm
Forum: HTTPAPI
Topic: Google API json response is unable to be pulled into rpgle data structure using DATA-INTO (Status Code 00356)
Replies: 4
Views: 29119

Re: Google API json response is unable to be pulled into rpgle data structure using DATA-INTO (Status Code 00356)

First of all congratulations on joining the club!

OK - your two basic problems which are fairly simple to handle. You may have others but ...

First, DATA-INTO needs to match elements by name and hierarchy. And "by name" includes the case in which the name is written. Now you may think that by ...
by jonboy49
Mon Jun 17, 2024 11:12 am
Forum: YAJL-ILE
Topic: DATA-INTO - ERROR RNQ0356
Replies: 2
Views: 45957

Re: DATA-INTO - ERROR RNQ0356

I’m viewing this on my phone so I may be misreading it but…

This is the type of json I hate because it is an array of elements but each element has a different name. Unless you know all the possible names it is tough to do with Date-Into - and even then it would be messy.

You might be better off ...
by jonboy49
Wed Jun 05, 2024 12:44 pm
Forum: HTTPAPI
Topic: Creating a url_head routine
Replies: 3
Views: 17297

Re: Creating a url_head routine

Have you tried HTTP_req() ? It is not method specific.
by jonboy49
Fri May 31, 2024 8:15 am
Forum: HTTPAPI
Topic: How to set "Authorization" in http header
Replies: 7
Views: 29561

Re: How to set "Authorization" in http header

Thanks - I looked at that first but there was no description so I looked briefly at the code and more seemed to be going on than just simply copying a value in. Guess I should have tried it but I was in a hurry.
by jonboy49
Thu May 30, 2024 4:35 pm
Forum: YAJL-ILE
Topic: JSON array without a named tag
Replies: 3
Views: 40953

Re: JSON array without a named tag

Don't have time to play with this - supposed to be on vacation ...

At first glance "properties" should just be an array not a DS.

So this:

Code: Select all

     num_properties        int(10);          
     properties   varchar(50)   dim(10);    
by jonboy49
Wed May 29, 2024 1:50 pm
Forum: HTTPAPI
Topic: How to set "Authorization" in http header
Replies: 7
Views: 29561

Re: How to set "Authorization" in http header

That was the first place I looked Scott but I could not see an option that produced the desired result.

How would you code it to do that?
by jonboy49
Mon May 27, 2024 10:52 pm
Forum: Other ScottKlement.com Tools
Topic: Using encoder64
Replies: 2
Views: 40653

Re: Using encoder64

I'm still wrestling with Base64 and RPG myself but ...

The simple answer is that you are encoding an EBCDIC string and expecting the results to match that of performing the same task with ASCII or UTF-8.

Base64 encoding is designed to preserve a _binary_ pattern. Which we can see most easily as ...
by jonboy49
Sun May 26, 2024 4:22 pm
Forum: HTTPAPI
Topic: How to set "Authorization" in http header
Replies: 7
Views: 29561

Re: How to set "Authorization" in http header

I have never seen this type of authentication before but the code below produces basically the same log as the curl you supplied.

This may not be the way to do it - Scott would undoubtedly know.

I can't tell if it will actually work because you didn't supply a real test IP nor details of the ...
by jonboy49
Sat May 25, 2024 5:40 pm
Forum: HTTPAPI
Topic: How to set "Authorization" in http header
Replies: 7
Views: 29561

Re: How to set "Authorization" in http header

What type of authentication is required? Basic, Bearer? Check out the prototype for http_setauth() for the details of the ones supported directly by HTTPAPI.

In some cases you may also need to call http_xproc( HTTP_POINT_ADDL_HEADER ... to add authentication tokens.

In other words, we can't really ...
by jonboy49
Mon May 13, 2024 8:49 pm
Forum: HTTPAPI
Topic: DATA-INTO with YAJLINTO
Replies: 11
Views: 45003

Re: DATA-INTO with YAJLINTO

Glad to hear you at least know that the empty array is not an issue.

There have been one or two PTFs related to RPG's DATA-INTO so I'm guessing that one of them is missing on one system.

Good luck.