// Copyright © WireMock.Net
using System.Net.Http;
using System.Net.Http.Headers;
namespace WireMock.Http;
internal static class StringContentHelper
{
///
/// Creates a StringContent object.
///
/// The string content (cannot be null)
/// The ContentType (can be null)
/// StringContent
internal static StringContent Create(string content, MediaTypeHeaderValue? contentType)
{
var stringContent = new StringContent(content);
stringContent.Headers.ContentType = contentType;
return stringContent;
}
}