Closed foryasbot closed 1 year ago
Hi @foryasbot !!
how are you sending your code? Can you post the example here? I use \n in my PHP projects. If you want to post it here so I can take a look, I'd appreciate it!
because sometimes it depends on how you convert the message you are sending, if it is an array and you already handle the "line break" it ignores the \n.
but send your example here for us to look at!
because sometimes it depends on how you convert the message you are sending, if it is an array and you already handle the "line break" it ignores the \n.
but send your example here for us to look at!
hi bro, i send messgae using curl like this: curl --location --request POST 'localhost:3333/message/text?key=mykey' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'id=myTargetPhonenumber' \ --data-urlencode 'message=hi \n how are you'
Try using these examples formatted in JSON, test both examples if one doesn't work.
Ex1:
curl --location --request POST 'localhost:3333/message/text?key=mykey'
--header 'Content-Type: application/json'
--data '{ "id" : "myTargetPhonenumber", "message" : "hi \nhow are you" }'
Ex2:
curl --location --request POST 'localhost:3333/message/text?key=mykey'
--header 'Content-Type: application/json'
--data ' {\"id\" : \"myTargetPhonenumber\", \"message\" : \"hi \nhow are you\" } '
Note: The \"
I'm using has the same principle as \n
. So if example 1 doesn't work, try example 2. Which is the method I use in my projects.
And also follow my example here if you want to implement or take advantage of something!!
I hope it helped you!
Learn about "escape characters" https://en.wikipedia.org/wiki/Escape_character
thank you bro, its work!
how send newline in message? i try \n or
not work.