InterviewSolution
| 1. |
How Do I Send Cookies With A Request? |
|
Answer» Proxy CLASSES are derived from IXmlRpcProxy and so inherit a CookieContainer property of type System.Net.CookieContainer, like the corresponding property of System.Net.HttpWebRequest. Instances of System.Net.COOKIE added to the CONTAINER will sent with the HTTP request. For example: ISumAndDiff proxy = (ISumAndDiff)XmlRpcProxyGen.Create(TYPEOF(ISumAndDiff)); Cookie cookie = new Cookie("foo", "BAR", "/", "www.wisdomjobs.com") proxy.CookieContainer.Add(cookie); SumAndDiffValue ret = proxy->SumAndDifference(2, 3); Proxy classes are derived from IXmlRpcProxy and so inherit a CookieContainer property of type System.Net.CookieContainer, like the corresponding property of System.Net.HttpWebRequest. Instances of System.Net.Cookie added to the container will sent with the HTTP request. For example: ISumAndDiff proxy = (ISumAndDiff)XmlRpcProxyGen.Create(typeof(ISumAndDiff)); Cookie cookie = new Cookie("foo", "bar", "/", "www.wisdomjobs.com") proxy.CookieContainer.Add(cookie); SumAndDiffValue ret = proxy->SumAndDifference(2, 3); |
|