「400 Bad Request」と「body 変数をお忘れですか?」というメッセージが表示されます。コード:
require "rest-client"
require "json"
# This is the ID that you copied down in the last exercise
your_folder_id = "816582409"
# Add the "body" variable here
body = { "description" => "I made this on Codecademy!"
}
response = RestClient.put(
"https://api.box.com/2.0/folders/#{816582409}",
JSON.generate(body),
:authorization => "Bearer" << "AKGEp7MoDfLAKnMyxTt3nSNtohXW3bt1"
)
JSON.parse(response.body)["description"]