私はカールと同じことを実行すると、しかし、私はこのような単純な何かを持っている、と私は422ルビー - > RestClientを取得:: UnprocessableEntity:422処理不能エンティティ
irb(main):024:0> RestClient.post 'http://dev.myServer.es/api/register', '{"first_name": "John"}', :content_type=>'application/json'
RestClient::UnprocessableEntity: 422 Unprocessable Entity
エラーを取得するには、[OK]を動作します:
curl --location "http://dev.myServer.es/api/register" -H 'Content-Type: application/json' -d '{"first_name": "John"}'
{"status": "OK"}
私はRubyにはかなり新しいですが、私は何が欠けているのか分かりません。 https://github.com/rest-client/rest-client#usage-raw-url - - ドキュメントの例があります
はあなたなぜ422エラーが発生しているのかについてサーバーログを記録します。更新または作成機能が失敗した場合、足場から遭遇したエラーです。 – Maru
サードパーティ製のサーバーで、ログにアクセスできません。 – Prem