Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - claude

#1
Programming / Re: trying to use a web service (API)
September 10, 2025, 12:51:18 PM

Hello everyone,

Thank you very much. We've resolved the issue. The variable a9 was set to zero, and the connection failed due to a timeout.

Regards
#2
Programming / trying to use a web service (API)
September 09, 2025, 12:18:59 PM
Hello everyone, we have a Linux server running Pxplus 11.50.  We're trying to use a web service (API) to issue digital invoices. Since it's somewhat complex and it doesn't work. We're trying a simpler API, but it doesn't work either. When we use the POSTMAN program, it works fine, from the same server.

With POSTMAN
Command: GET https://cataas.com/api/count

Body:
{
"id": "string",
"tags": [
"string"
],
"mimetype": "string",
"createdAt": "string"
}

Response Received:
{"count":1987}


With PxPlus

The test program is as follows:

10 CLOSE (1); OPEN (1)"json3.txt"
20 LET JSON1$=""
30 READ RECORD (1,END=0060)JSON1_AUX$
40 LET JSON1$+=JSON1_AUX$
50 GOTO 0030
60 CLOSE (1)
70 PRINT JSON1$
80 LET A8$="GET"
90 REM -------------A2$="{"+CHR(34)+"User"+CHR(34)+":"+CHR(34)+"kqcorfelofxx_tfhka" +CHR(34)+","+CHR(34)+"Password"+CHR(34)+": "+CHR(34)+";xxxxxxxxx"+CHR(34)+"}"
100 LET A2$=JSON1$
110 CALL "*plus/web/request","https://cataas.com/api/count",A2$,A3$,A4$,A5$,A6$,A7$,A8$,A9



The program output is as follows (Both on the Server and on a Windows PC):

->run
{"id": "string","tags": ["string"],"mimetype": "string","createdAt": "string"}
0110 CALL "*plus/web/request","https://cataas.com/api/count",A2$,A3$,A4$,A5$,A6
0110:$,A7$,A8$,A9
Cannot contact host server
1>


Please can you guide us to use the web service (API) from Pxplus?

Thank you very much and greetings

Claude H.