更新时间:2021-07-20 15:39:51
我想出了我需要做什么
post("scores", {:score => {:mobile_user_id => @mobile_user.id, :points => 50, :time_taken => 7275}}.to_json,
{"HTTP_USER_AGENT" => "Mobile", 'HTTP_AUTHORIZATION' => get_basic_auth, 'HTTP_CONTENT_TYPE' => "application/json"}
显然不需要移动"用户代理来测试普通的 json 请求.
Obviously the "mobile" user agent is not needed to test normal json requests.
希望对某人有帮助