Hi all,
use the code can add to the cookie : foo1="bar1"
but use Fiddler get the cookie is : foo1=bar1 ,there has no quotation mark, What do I need to do?
thaks!
Dim jo As JavaObject = HttpUtils2Service.hc
Dim client As JavaObject = jo.GetField("client")
Dim r As Reflector
r.Target = client.RunMethod("cookieJar", Null)
Dim CookieManager As JavaObject = r.GetField("cookieHandler")
Dim cookieStore As JavaObject= CookieManager.RunMethodJO("getCookieStore",Null)
Dim uri As JavaObject
uri.InitializeNewInstance("java.net.URI", Array("
http://8.8.8.8"))
Dim NewCookie As JavaObject
NewCookie.InitializeNewInstance("java.net.HttpCookie",Array("foo1","bar1"))
cookieStore.RunMethod("add", Array(uri,NewCookie))