在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
def self.get_express_route_test url = 'http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService' xml = "<Request service='RouteService' lang='zh-CN'><Head>4545</Head><Body><RouteRequest tracking_type='1' method_type='1' tracking_number='444003077898'/></Body></Request>" keyword = 'dsadsa' md5_str = Digest::MD5.digest((xml + keyword).encode('utf-8')) verifyCode = Base64.strict_encode64(md5_str) uri = URI.parse(url) req = Net::HTTP::Post.new(uri.path,{'Content-Type' => 'application/x-www-form-urlencoded;charset=utf-8'}) req.body = "xml=#{xml}&verifyCode=#{verifyCode}" req = Net::HTTP.new(uri.host,uri.port).start{|http| http.request(req)} Rails.logger.debug req.body end
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论