-3

I create batch file to sent message to line notify. I want new line in my message. I try to use \n, %0a but it can't use.

curl -X POST -H "Authorization: Bearer mytoken" -F "message=Computer 1 sent message!" https://notify-api.line.me/api/notify

in message=Computer 1 sent message! I want output follow:

Computer 1

sent message!

Sam Denty
  • 3,693
  • 3
  • 30
  • 43
  • 1
    Possible duplicate of [cURL for Windows: how can I send multiple line command in a console?](https://stackoverflow.com/questions/24556064/curl-for-windows-how-can-i-send-multiple-line-command-in-a-console) –  Jun 09 '17 at 15:09

1 Answers1

0

Try like below, that should work

curl -X "POST" "https://notify-api.line.me/api/notify" \ -H "Authorization: Bearer mytoken" \ -H "Content-Type: multipart/form-data" \ -d $'Computer 1 sent message! Line1 Line2 Line3'

Ravikiran Reddy Kotapati
  • 2,485
  • 3
  • 22
  • 27
  • This is cmd not bash/*nix-shell, the line continuation char is `^` not `\` –  Jun 09 '17 at 15:12