0
私はgolangプログラムが1秒ごとに(投稿として)1つのサーバにアイテムを送信しています。 Golangリスニングプログラムは、ハッシュなどの項目を出力しますGOLangがRailsアプリケーションに投稿する
{"Address":"[email protected]", "EmailType":"test", "Event":"test", "Timestamp":1234}.
今私はレールのサーバーにこのデータを送信し、データベースに各イベントを保存したいです。私は私のポストルートにプログラムをポイントしたときしかし、私はこのエラーを取得する:
Started POST "/items" for ::1 at 2016-08-23 00:36:17 +0200
Processing by ItemsController#create as HTML
Can't verify CSRF token authenticity
Completed 422 Unprocessable Entity in 1ms (ActiveRecord: 0.0ms)
エラーがgolangプログラムに乗るです:
Sending events to: http://localhost:4000/items
2016/08/23 00:36:17 Expecting 200 returned, got %!f(int=422)
誰もが間違っていただきまして私を助けることはできますか?
素晴らしいです! – Gregor