LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Line Notify doesn't accept some sign

Hello everyone.

 

I create line notify in LabVIEW 2018 to send notifications to mobile. The problem is the line notify doesn't send ampersand and percent sign. What's the reason?

 

Thank you in advance.

 

line.PNG

 

line2.PNG

 

0 Kudos
Message 1 of 3
(4,310 Views)

You probably need to escape that text in some way.

 

Shouldn't the data be JSON? So like: "message":"%&"? Or is that just for the cURL part?

 

Anyway, the message gets send, but is rejected by the server. So it's more a question to the server side. The spec isn't really clear...

0 Kudos
Message 2 of 3
(4,290 Views)

Hi therinoy,

 

For sending a application/x-www-form-urlencoded message you need to escape certain characters. You can see an introduction on wikipedia that shows an example of how characters like % are escaped

 

The wikipedia article describes the following rules for escaping characters when using application/x-www-form-urlencoded:

 

Keys and values are both escaped by replacing spaces with the '+' character and then using percent-encoding on all other non-alphanumeric characters.

Since the % character and the & character are both non-alphanumeric, they will both need to be encoded to become %25 and %26 respectively. So to set the message property to the characters %& you have to encoded them as %25%26.


Milan
0 Kudos
Message 3 of 3
(4,262 Views)