LoginSignup
0
0

More than 5 years have passed since last update.

メタ文字が入るとチャットワークに送信できない

Last updated at Posted at 2017-12-27

チャットワークにとあるアラートをcurlで送ろうとすると、文字が途中で切れてしまう現象に見舞われました。

# コマンド内容はこんな感じ
curl -X POST -H "X-ChatWorkToken:[token_id]" -d "body=サンプル&サンプル" "https://api.chatwork.com/v2/rooms/[roomid]/messages" > /dev/null 2>&1

文字が切れる原因はメタ文字でした。

という事で、bodyの内容をURLエンコードをしたら正常に送れるようになりました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0