我使用plivo搜索号api按所选参数列出电话号码。
红宝石代码是:
get '/search_numbers' do
p = RestAPI.new(AUTH_ID, AUTH_TOKEN)
params = {'country_iso' => 'GB'}
response = p.search_phone_number(params)
end
我收到的错误是:
88.106.106.78 - - [22/Jan/2015:15:02:59 +0000] "GET /search_numbers HTTP/1.0" 200 - 1.7485
2015-01-22 15:02:59 +0000: Read error: #<NoMethodError: undefined method `bytesize' for ["api_id", "c025f0cc-a247-11e4-b153-22000abcaa64"]:Array>
我根本无法弄清楚出了什么问题。我看不到拼写错误,传递的参数是正确的,格式正确,函数是正确的函数。
请帮助!