如何在android中制作Cookie容器?
我发现在 vb.net 中,在 webclient 中继承。是这样的:
**Private cookieCont As New Net.CookieContainer()**
Private lastPage As String
Protected Overrides Function GetWebRequest(ByVal address As System.Uri) As System.Net.WebRequest
Dim wr = MyBase.GetWebRequest(address)
If TypeOf wr Is Net.HttpWebRequest Then
With DirectCast(wr, Net.HttpWebRequest)
**.CookieContainer = cookieCont**
If lastPage IsNot Nothing Then
.Referer = lastPage
End If
End With
End If
lastPage = address.ToString()
Return wr
End Function
谢谢!