Skip to content

Commit

Permalink
Add MediaTypeNames (#103575)
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinAlpert authored Jun 17, 2024
1 parent e679b59 commit ac996f3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libraries/System.Net.Mail/ref/System.Net.Mail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ public static partial class MediaTypeNames
public static partial class Application
{
public const string FormUrlEncoded = "application/x-www-form-urlencoded";
public const string GZip = "application/gzip";
public const string Json = "application/json";
public const string JsonPatch = "application/json-patch+json";
public const string JsonSequence = "application/json-seq";
Expand Down Expand Up @@ -366,11 +367,14 @@ public static partial class Multipart
{
public const string ByteRanges = "multipart/byteranges";
public const string FormData = "multipart/form-data";
public const string Mixed = "multipart/mixed";
public const string Related = "multipart/related";
}
public static partial class Text
{
public const string Css = "text/css";
public const string Csv = "text/csv";
public const string EventStream = "text/event-stream";
public const string Html = "text/html";
public const string JavaScript = "text/javascript";
public const string Markdown = "text/markdown";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ public static class Application
/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data consists of url-encoded key-value pairs.</summary>
public const string FormUrlEncoded = "application/x-www-form-urlencoded";

/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is in gzip format.</summary>
public const string GZip = "application/gzip";

/// <summary>Specifies that the <see cref="MediaTypeNames.Application"/> data is in JSON format.</summary>
public const string Json = "application/json";

Expand Down Expand Up @@ -118,6 +121,12 @@ public static class Multipart

/// <summary>Specifies that the <see cref="MediaTypeNames.Multipart"/> data is in form data format.</summary>
public const string FormData = "multipart/form-data";

/// <summary>Specifies that the <see cref="MediaTypeNames.Multipart"/> data is in mixed format.</summary>
public const string Mixed = "multipart/mixed";

/// <summary>Specifies that the <see cref="MediaTypeNames.Multipart"/> data is in related format.</summary>
public const string Related = "multipart/related";
}

/// <summary>Specifies the kind of text data in an email message attachment.</summary>
Expand All @@ -129,6 +138,9 @@ public static class Text
/// <summary>Specifies that the <see cref="MediaTypeNames.Text"/> data is in CSV format.</summary>
public const string Csv = "text/csv";

/// <summary>Specifies that the <see cref="MediaTypeNames.Text"/> data is in event stream format.</summary>
public const string EventStream = "text/event-stream";

/// <summary>Specifies that the <see cref="MediaTypeNames.Text"/> data is in HTML format.</summary>
public const string Html = "text/html";

Expand Down

0 comments on commit ac996f3

Please sign in to comment.