RubyアプリからPOSTリクエストを実行しようとしていますが、次のエラーが発生します。
コードは次のとおりです。
def action_reply(token,action_id,reply_text)
require 'uri'
require 'net/http'
require 'net/https'
@reply = { 'ACTION_ID' => action_id, 'text' => reply_text }.to_json
#A token is required to do this post
@token_url = 'https://example.com/reply?oauth_token=' + token
uri = URI.parse(@token_url)
response = Net::HTTP.post_form(uri,@reply)
end
最後のステップで次のようなエラーが発生します。
NoMethodError (undefined method `map' for #<String:0x000000063798e8>)
これがなぜなのか、何か考えはありますか?
ありがとう!