我要发送请求到一个网站,它接到请求后跳转到一个页面,这个页面里包含我需要的结果,现在response=RestClient.post url, post_params , headers会 302 Found 咋搞?
response=RestClient.post url, post_params , headers
https://github.com/rest-client/rest-client#result-handling
RestClient.post(url) { |response, request, result, &block| if [301, 302].include? response.code response.follow_redirection(request, result, &block) else response.return!(request, result, &block) end }