I am using Visual Studio 2008 and have added a web reference that points to a WCF web service. Visual Studio has generated a client class automatically, so all I need to do to call the web service is to create an instance of the client and call the method on it.
FoodPreferenceServiceClient client = new FoodPreferenceServiceClient();
FoodPreferenceServiceResponse = client.GetFoodPreference();
The FoodPreferenceServiceClient is the web service client that is automatically generated by VS. The GetFoodPreference is the method on the web service that I am calling.
My problem is that I want to expose the actual HTTP header received in the above call, such as client.GetHttpResponse() or something.
Is there a way to do this?