简体   繁体   English

如何在curl中添加新行

[英]How to add new line in curl

I am trying to send a API request through my telegram bot我正在尝试通过我的电报机器人发送 API 请求

curl -XPOST 'https://api.telegram.org/bot$token/sendMessage?chat_id=$chatid&text=*ALERT*\\n\\n_Hello moderators please upgrade my SQL database for my proper functioning !\\nSet a new DATABASE URL_&parse_mode=markdown'

But the "\\n" doesn't make new lines and the text comes as it is, the markdown is working but the new lines aren't但是“\\n”不会创建新行并且文本按原样出现,降价正在运行但新行没有

好的,它需要使用%0A而不是\\n

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM