API call with Headers

Discussions related to HTTPAPI (An HTTP Client Package for RPG programming.) http://www.scottklement.com/httpapi/
RINALDI_V
Posts: 13
Joined: Fri Jun 14, 2024 10:03 am

Re: API call with Headers

Post by RINALDI_V »

Thanks. I probably created a problem that doesn't exist, because it works anyway!

But now I have another problem.
The attachment JSON_RIC_IVA.pdf is no longer available
This is a JSON response that I convert in DS whith YAJLGEN (Result_YAJLGEN)

JSON_RIC_IVA.pdf
(134.43 KiB) Downloaded 1666 times
and in my rpg this is DATA-INTO:

Code: Select all

         YAJLOPTS='{"number_prefix": "YAJL_"}';

        DATA-INTO Dsjson %DATA( response
                              : 'case=convert +
                                 allowextra=yes +
                                 allowmissing=yes +
                                 countprefix=num_')
                           %PARSER('YAJLINTO': YAJLOPTS);
Attachments
Result_YAJLGEN.pdf
(56.19 KiB) Downloaded 1932 times
Last edited by RINALDI_V on Thu Jul 18, 2024 4:00 pm, edited 1 time in total.
RINALDI_V
Posts: 13
Joined: Fri Jun 14, 2024 10:03 am

Re: API call with Headers

Post by RINALDI_V »

I get this error

Image

But the DS is perfect up to Data 6; from the next record, the DS are empty.

Image



What can I check?
Attachments
Screenshot 1.png
Screenshot 1.png (59.18 KiB) Viewed 19976 times
Screenshot Error.png
Screenshot Error.png (8.75 KiB) Viewed 19976 times
Scott Klement
Site Admin
Posts: 872
Joined: Sun Jul 04, 2021 5:12 am

Re: API call with Headers

Post by Scott Klement »

Move the cursor to the error message and press F1 to get more details about what the error is.

Most likely it's mapping data to the DS until it gets the error, then stops -- so you have only a partial one filled in.
RINALDI_V
Posts: 13
Joined: Fri Jun 14, 2024 10:03 am

Re: API call with Headers

Post by RINALDI_V »

Scott Klement wrote: Thu Jul 18, 2024 4:08 pm Move the cursor to the error message and press F1 to get more details about what the error is.

Most likely it's mapping data to the DS until it gets the error, then stops -- so you have only a partial one filled in.
Sure, this is clear, but I don’t know what else to check to understand the problem.

Image
Attachments
Screenshot error1.png
Screenshot error1.png (21.59 KiB) Viewed 19970 times
Scott Klement
Site Admin
Posts: 872
Joined: Sun Jul 04, 2021 5:12 am

Re: API call with Headers

Post by Scott Klement »

I don't speak Italian. What does the message say?
Post Reply