2019-07-26 19:53:28 +00:00
|
|
|
using System.IO;
|
|
|
|
using System.Threading;
|
2019-04-12 14:10:50 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Net.Http.Headers;
|
|
|
|
|
|
|
|
namespace System.Net.Http
|
|
|
|
{
|
2019-07-26 19:53:28 +00:00
|
|
|
static class PlatformHelper
|
2019-04-12 14:10:50 +00:00
|
|
|
{
|
|
|
|
internal static bool IsContentHeader (string name)
|
|
|
|
{
|
|
|
|
return HttpHeaders.GetKnownHeaderKind (name) == Headers.HttpHeaderKind.Content;
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static string GetSingleHeaderString (string name, IEnumerable<string> values)
|
|
|
|
{
|
|
|
|
return HttpRequestHeaders.GetSingleHeaderString (name, values);
|
|
|
|
}
|
2019-07-26 19:53:28 +00:00
|
|
|
|
|
|
|
internal static StreamContent CreateStreamContent (Stream stream, CancellationToken cancellationToken)
|
|
|
|
{
|
|
|
|
return new StreamContent (stream, cancellationToken);
|
|
|
|
}
|
2019-04-12 14:10:50 +00:00
|
|
|
}
|
|
|
|
}
|