파이썬 (및 제 브라우저)에서 https://www.devrant.com/api/devrant/rants?app=3&sort=algo&limit=10&skip=0
에게 요청을 보내고 예상대로 응답을 얻을 수 있지만 루아를 사용하면 HTTP/1.1 301 Moved Permanently
이됩니다. HTTP 오류 페이지 (영구 이동) 및301 socket.http와 영구적으로 이동
301 table: 0x8f32470 http/1.1 301 Moved Permanently
테이블의 내용을 출력
는http = require("socket.http");
print(http.request("https://www.devrant.com/api/devrant/rants?app=3&sort=algo&limit=10&skip=0")
은 다음과 같습니다 :
location https://www.devrant.com/api/devrant/rants?app=3&sort=algo&limit=10&skip=0
content-type text/html
server nginx/1.10.0 (Ubuntu)
content-length 194
connection close
date Mon, 11 Dec 2017 01:41:35
왜에만 루아를 수행 여기에 지금까지 시도한 것입니다 이 오류가 발생합니까? Google에 요청하면 Google 홈페이지 HTML이 표시됩니다. status.mojang.com에 요청하면 JSON 응답 문자열에 mojang 서버 상태가 표시되므로 소켓이 확실하게 작동합니다.
내가 바닐라 루아와 할 수있는 일이 있습니까? – AlgoRythm
아니요; luasocket과 luasec가 필요합니다. –