Relaying a request in asp.net (Forwarding a request)

后端 未结 5 2283
面向向阳花
面向向阳花 2020-12-07 16:04

I have a web application that communicates between two different web applications (one receiver and one sender, the sender communicates with my application, and my applicati

5条回答
  •  -上瘾入骨i
    2020-12-07 16:56

    possiblly something like:

    HttpWebRequest request = (HttpWebRequest)WebRequest.Create("www.testing.test");
    request.Headers = (WebHeaderCollection)Request.Headers;
    

    Then call the get response

    HttpWebResponse response  = (HttpWebResponse)request.GetResponse();
    

    This will have the same HTTP headers as the original request.

提交回复
热议问题