require 'net/http'
require 'net/https'
url = 'nav.fetion.com.cn'
path = '/ssiportal/SSIAppSignIn.aspx?mobileno=13909850927&pwd=XXX'
http = Net::HTTP.new(url, 443)
http.use_ssl = true
resp, data = http.get(path, nil)
cookie = resp.response['set-cookie']
#puts resp.response.methods.sort
puts data
puts cookie
data内容如下,包含sip uri:
<?xml version="1.0" encoding="utf-8" ?>
<results status-code="200">
<user uri="sip:789353929@fetion.com.cn;p=4999"
mobile-no="13909850927" user-status="101" user-id="401267520">
<credentials>
</credentials>
</user>
</results>
Set-Cookie中包含关键的ssic。