HttpWebRequest and Response
<p>I am writing a c# program for <code>HttpRequest</code> and <code>Response</code> as below.</p>

<pre><code>public string Methods(int id)
{
    HttpWebRequest Request = (HttpWebRequest) WebRequest.Create(@"http://172.17.18.16:8082/item/detail/90");

    Request.Method = "Get";
    WebResponse Response = Request.GetResponse();

    IHttpRequest request = (IHttpRequest)Request;
    IHttpResponse response = (IHttpResponse)Response;

    SetupRequest(request, response, session);
    //Request.Method = Method.Get;
    string m = request.Method;
    TemplateManager mg=new TemplateManager();
    ItemController it = new ItemController(mg);
    it.Detail();
    return m;
}
</code></pre>

<p>Here <code>IHttpRequest</code> and <code>IHttpResponse</code> are the Interfaces which are already created.
I want to assign <code>HttpWebRequest Request</code> to the interface so that the remaining functionality should happen itself. I am getting error in casting lines as </p>

<blockquote>
  <p>Unable to cast object of type 'System.Net.HttpWebRequest' to type 'HttpServer.IHttpRequest'.</p>
</blockquote>

<p>Please help me to find a solution</p>

<p>Thanks</p>
