$kcode = utf8
这几个字转化正确:
轻: u8f7b
身: u8eab
药: u836f
剂: u5242
Net::HTTP.new方法,返回resp码和实际的data:
require 'net/http'h = Net::HTTP.new("www.baidu.com",80)
resp,data = h.get("/")
puts resp
puts data
$kcode = utf8
这几个字转化正确:
轻: u8f7b
身: u8eab
药: u836f
剂: u5242
Net::HTTP.new方法,返回resp码和实际的data:
require 'net/http'h = Net::HTTP.new("www.baidu.com",80)
resp,data = h.get("/")
puts resp
puts data