0
http://www.nasdaqomxnordic.com/shares/listed-companies/nordic-large-cap을 사용하여 데이터를 긁어 내려고했습니다. 제가 테스트 한Ruby Net :: HTTP 400 잘못된 요청
require 'net/http'
require 'uri'
def get_stocks()
uri = URI.parse('http://www.nasdaqomxnordic.com/aktier/listed-companies/stockholm')
response = Net::HTTP.get_response(uri)
puts response
end
get_stocks()
다른 사이트 좋은 작품과 200로 응답 : 다음 순 :: HTTP를 사용하여 가져 오기 요청을 보낼 내 코드는 확인하지만 http://www.nasdaqomxnordic.com/shares/listed-companies/nordic-large-cap#<Net::HTTPBadRequest:0x00007ffe8f84ec30>
를 반환하고 나는 이유를 이해할 수 없다. 더 컨텍스트 response.body
반환에 대한
: OK :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="TEXT/HTML; CHARSET=utf-8"/>
<title>400 Bad Request</title></head>
<body>
<H2>400 Bad Request</H2>
<p>The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.</p>
<p>This page can't be displayed.<br/>The incident ID is: 10039581164792379.</p>
<p>If you would like assistance, please contact the Support for additional information.<br></p>
</body>
</html>
나는 200 얻기 위해 무엇을 할 수 있는가?
도움을 주신 분께 감사드립니다. 미리 감사드립니다!
감사합니다 사용하여 응답 본문을 얻을 수 있습니다! 너는 나에게 많은 좌절감을 구했다! – Villevillekulla