mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-15 06:43:37 +01:00
* Create WireMock.Net.MimePart project * . * REFACTOR * ILRepack * -- * ... * x * x * . * fix * public class MimePartMatcher * shared * min * . * <!--<DelaySign>true</DelaySign>--> * Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
22 lines
667 B
C#
22 lines
667 B
C#
// Copyright © WireMock.Net
|
|
|
|
using System.Net.Http;
|
|
using System.Net.Http.Headers;
|
|
|
|
namespace WireMock.Http;
|
|
|
|
internal static class StringContentHelper
|
|
{
|
|
/// <summary>
|
|
/// Creates a StringContent object.
|
|
/// </summary>
|
|
/// <param name="content">The string content (cannot be null)</param>
|
|
/// <param name="contentType">The ContentType (can be null)</param>
|
|
/// <returns>StringContent</returns>
|
|
internal static StringContent Create(string content, MediaTypeHeaderValue? contentType)
|
|
{
|
|
var stringContent = new StringContent(content);
|
|
stringContent.Headers.ContentType = contentType;
|
|
return stringContent;
|
|
}
|
|
} |