mirror of https://github.com/dapr/dotnet-sdk.git
remove hardcoded application/json in favour of MediaTypeNames and use ContentTypeApplicationJson property
This commit is contained in:
parent
fc7b666fbe
commit
33d7a2dafd
|
|
@ -3,11 +3,13 @@
|
|||
// Licensed under the MIT License.
|
||||
// ------------------------------------------------------------
|
||||
|
||||
using System.Net.Mime;
|
||||
|
||||
namespace Dapr.Client
|
||||
{
|
||||
internal class Constants
|
||||
{
|
||||
public const string ContentTypeApplicationJson = "application/json";
|
||||
public const string ContentTypeApplicationJson = MediaTypeNames.Application.Json;
|
||||
public const string ContentTypeApplicationGrpc = "application/grpc";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ namespace Dapr.Client
|
|||
if (content != null)
|
||||
{
|
||||
envelope.Data = content;
|
||||
envelope.DataContentType = "application/json";
|
||||
envelope.DataContentType = Constants.ContentTypeApplicationJson;
|
||||
}
|
||||
|
||||
if (metadata != null)
|
||||
|
|
|
|||
Loading…
Reference in New Issue