PxPlus User Forum

Twitter Twitter Twitter

Recent Posts

Pages: 1 ... 3 4 [5] 6 7 ... 10
41
Programming / Re: JSON from Array with numeric and string
« Last post by Stéphane Devouard on March 27, 2024, 12:44:59 PM »
Hi Cedric

Check out the DIM CLASS directive : https://manual.pvxplus.com/PXPLUS/directives/dim_class.htm

Hope this helps
42
Programming / JSON from Array with numeric and string
« Last post by Cedric on March 27, 2024, 12:12:59 PM »
Hi,

I'm wondering if there was a way I could "force" a json value to be a numeric when the Array is set to string.   I have a case where I need to send the data in a specific format for the end user (not pvx) who uses variable types.

So my data is all sent as if they were string, but I'd like one specific value to be without quotation mark, so as a numeric value.

I thought that maybe there was a prefix I could put before the value so that PVX would recognize it as a numeric for the end result of :

"value": 1,

instead of

"value": "1",


43
Programming / JSON from Array with numeric and string
« Last post by Cedric on March 27, 2024, 12:02:48 PM »
Hi,

I'm wondering if there was a way I could "force" a json value to be a numeric when the Array is set to string.   I have a case where I need to send the data in a specific format for the end user (not pvx) who uses variable types.

So my data is all sent as if they were string, but I'd like one specific value to be without quotation mark, so as a numeric value.

I thought that maybe there was a prefix I could put before the value so that PVX would recognize it as a numeric for the end result of :

"value": 1,

instead of

"value": "1",


44
Programming / Re: accessing mySQL-DB
« Last post by EVa on March 26, 2024, 05:08:25 AM »
A temporary work-around is to downgrade the mariadb3 package to version 3.1.13-3.30.1 - the PxPlus MYSQL interface works correctly with that version.
45
Programming / Re: accessing mySQL-DB
« Last post by EVa on March 26, 2024, 04:54:28 AM »
PvxPlus Technologies is looking into this.
46
Language / Re: ERROR 302 file not found
« Last post by Stéphane Devouard on March 25, 2024, 04:24:12 PM »
Hi

HTTP error 302 is not a file not found error but a redirect status

You should use the *plus/web/request http client instead, which will follow redirections

Regards
47
Language / Re: ERROR 302 file not found
« Last post by edjack on March 25, 2024, 03:40:51 PM »
Does it work if you actually include the filename in the URL?

it does not work if i use the file name.
48
Language / Re: ERROR 302 file not found
« Last post by Loren Doornek on March 25, 2024, 02:21:17 PM »
Does it work if you actually include the filename in the URL?

08120  LET R$="GET /download/update/index.html HTTP/1.0"+$0D0A$
49
Language / ERROR 302 file not found
« Last post by edjack on March 25, 2024, 01:50:26 PM »
I do the following [tcp] GET from a web site and get an error 302 (file not found)
Here is the code I am using:
08120  LET R$="GET /download/update/ HTTP/1.0"+$0D0A$
08130  LET R$+="Accept-Language: en-us"+$0D0A$
08140  LET R$+="Content-Type: application/x-www-form-urlencoded"+$0D0A$
08150  LET R$+="Host: www.website.ca"+$0D0A$
08160  LET R$+="Content-Length: "+STR(LEN(PARAMS$))+$0D0A$
08170  LET R$+="Cache-Control: no-cache"+$0D0A$+$0D0A$
08180  CLOSE (1);
       OPEN (1,ERR=*NEXT)"[tcp]www.website.ca;80";
       GOTO 8200
08190  MSGBOX "Unable to connect to the Upgrade Web Site.","Connection Failure","!,TIM=15";
       LET CMD_STR$="END";
       RETURN
08200  WRITE RECORD (1)R$;
       LET RESP$="",X$=""
08210  WHILE 1
08220  READ RECORD (1,TIM=1,ERR=*BREAK)X$
08230  LET RESP$+=X$
08240  WEND
08250  CLOSE (1)

It should bring back the contents of file "index.html" but reports that it cannot find the file.
If I enter the full path to the website and directory in my browser it do get the contents of the "index.html" file.

any ideas on what can be wrong?

50
Programming / Re: accessing mySQL-DB
« Last post by Thomas Bock on March 25, 2024, 04:57:34 AM »
Are there any new insights?
Pages: 1 ... 3 4 [5] 6 7 ... 10