Example #1
0
 /// <summary>
 /// Serialize the content into string using the serializer registerd for given content type.
 /// </summary>
 /// <param name="contentType">The content type (MIME type) into which the request body must be serialized.</param>
 /// <returns>String representation of the request body, formatted into the provided content type.</returns>
 public virtual string ToString(ContentType contentType)
 {
     var serializer = RestConfiguration.Serializers.GetSerializer(contentType.ToString());
     return serializer.Serialize(this);
 }