コード例 #1
0
 private HttpContent CreateRsvpContent(Rsvp rsvpToUpdate)
 {
     DataContractSerializer singleSerializer = new DataContractSerializer(typeof(Rsvp));
     HttpContent content = rsvpToUpdate.ToContentUsingDataContractSerializer(singleSerializer);
     content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/xml");
     return content;
 }