public HttpContent Serialize(object obj) { var content = new StreamContent(serializer.Serialize(obj)); content.Headers.ContentType = new MediaTypeHeaderValue(MediaType.Text.Plain); return(content); }
public HttpContent Serialize(object obj) { var stream = serializer.Serialize(obj); var content = new StreamContent(stream); content.Headers.ContentType = new MediaTypeHeaderValue(MediaType.Application.Json); return(content); }