1
class WorkoutScreen < PM::WebScreen
title "Workouts"
def content
@response
end
def on_load
set_nav_bar_button :left, title: "Menu", action: :nav_left_button
end
def load_started
@response = ''
BubbleWrap::HTTP.get("my_url", {async: false, :headers => { "User-Agent" => "value"}}) do |response|
@response = response.body.to_str
end
end
def nav_left_button
app_delegate.menu.show(:left)
end
end
特定のヘッダーでHTTP要求を送信する必要がありますが、コンテンツは常にnilです。私はスニファによる応答を確認しました。すべてがOKです。BubbleWrapからのPM :: WebScreenのコンテンツの表示応答
私は私が見る
class WorkoutScreen < PM::WebScreen
title "Workouts"
def content
@response = ''
BubbleWrap::HTTP.get("my_url", {async: false, :headers => { "User-Agent" => "value"}}) do |response|
@response = response.body.to_str
end
@response
end
この方法を行う場合
eb_screen_module.rb:50:set_content `で: ':ディレクトリです - 読みは()が失敗した(errnoに:: EISDIR)
例外
こんにちは、同じエラーが発生しました。どのように設定するのですか? – Anna88