1

Let's say we receive an HttpRequestMessage:

void Process(HttpRequestMessage request)
{
    var newRequest = new HttpRequestMessage;
    newRequest.Content = request.Content; //are the Content properties pointing to the same memory location??

    //do stuff
}

If I mutate request.Content, will newRequest.Content be affected as well?

Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062
  • Take a look at this https://stackoverflow.com/questions/25044166/how-to-clone-a-httprequestmessage-when-the-original-request-has-content – Nkosi Jul 26 '17 at 21:04
  • And this https://stackoverflow.com/questions/21467018/how-to-forward-an-httprequestmessage-to-another-server – Nkosi Jul 26 '17 at 21:05

0 Answers0