Search found 13 matches

by RINALDI_V
Fri Jul 19, 2024 10:28 am
Forum: HTTPAPI
Topic: API call with Headers
Replies: 14
Views: 53223

Re: API call with Headers


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 ...
by RINALDI_V
Thu Jul 18, 2024 2:26 pm
Forum: HTTPAPI
Topic: API call with Headers
Replies: 14
Views: 53223

Re: API call with Headers

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?
by RINALDI_V
Thu Jul 18, 2024 2:23 pm
Forum: HTTPAPI
Topic: API call with Headers
Replies: 14
Views: 53223

Re: API call with Headers

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

But now I have another problem.

JSON_RIC_IVA.pdf

This is a JSON response that I convert in DS whith YAJLGEN (Result_YAJLGEN)


Result_YAJLGEN.pdf

and in my rpg this is DATA-INTO:


YAJLOPTS='{"number_prefix ...
by RINALDI_V
Tue Jul 16, 2024 3:52 pm
Forum: HTTPAPI
Topic: API call with Headers
Replies: 14
Views: 53223

Re: API call with Headers

Actually, it seems that the problem is the 'null' fields and I solved like this:

*********
YAJLOPTS='{"value_null":"0"}';

DATA-INTO Dsjson %DATA( response
: 'case=convert +
allowextra=yes +
allowmissing=yes')
%PARSER('YAJLINTO': YAJLOPTS);
*********
But this way the issue remains for char ...
by RINALDI_V
Tue Jul 16, 2024 8:22 am
Forum: HTTPAPI
Topic: API call with Headers
Replies: 14
Views: 53223

Re: API call with Headers

Now I have another error! The response I get from the GET is this:

*********************************************************************************
{"aliqivavent": null,
"annotazioni": null,
"codice": "22",
"codiceagr": null,
"codiceOss": null,
"codPlafond": 0.0,
"descrizione": "Iva Impon ...
by RINALDI_V
Fri Jul 12, 2024 10:32 am
Forum: HTTPAPI
Topic: API call with Headers
Replies: 14
Views: 53223

Re: API call with Headers

Perfect! It works! Thank you so much for your availability :D
by RINALDI_V
Thu Jul 11, 2024 11:12 am
Forum: HTTPAPI
Topic: API call with Headers
Replies: 14
Views: 53223

Re: API call with Headers

I tried to do it this way, but the error is always the same. How can I pass 'Authorization-scope = TSEV12' to it, which in Postman is included among the headers? I saw that by removing 'Authorization-scope = TSEV12' from Postman, I still get the same error, so the issue is probably that...
by RINALDI_V
Thu Jul 11, 2024 7:33 am
Forum: HTTPAPI
Topic: API call with Headers
Replies: 14
Views: 53223

Re: API call with Headers

Sorry, I am new to this world and still have a lot to learn. So how should I structure a request of this type?
by RINALDI_V
Wed Jul 10, 2024 3:52 pm
Forum: HTTPAPI
Topic: API call with Headers
Replies: 14
Views: 53223

API call with Headers

Hello, attached I have posted 2 screenshots. One shows how I make a call from Postman that works, and the other screenshot shows my RPGLE code that gives me an error "HTTP/1.1 500 Internal Server Error". What am I doing wrong?
by RINALDI_V
Wed Jul 10, 2024 10:47 am
Forum: HTTPAPI
Topic: handling body
Replies: 5
Views: 14647

Re: handling body

Thank you very much, this way it works!