In a method, I need to know if the response is in Http or Https in order to redirect the response or to make a BinaryWrite but I only have a HttpResponse in parameter.
Anyone know if it’s possible to use the HttpResponse to know that?
Thanks.
EDIT:
I want to know if it’s possible to know if a HttpResponse is HTTP or HTTPS, because I prefer not to use HttpContext.Current.Request if possible.
I don’t believe so. You can find out from the HttpRequest, but a response is just a stream of data returned in relation to the Request.