提交 518540a0 编写于 作者: M Michael Koziarski

Add code and message to test response as per #2460

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2621 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 e7f61eab
......@@ -126,6 +126,14 @@ def response_code
headers['Status'][0,3].to_i rescue 0
end
def code
headers['Status'].to_s.split(' ')[0]
end
def message
headers['Status'].to_s.split(' ',2)[1]
end
# was the response successful?
def success?
response_code == 200
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册