21 references to ProtobufContentType
Aspire.Dashboard (4)
Otlp\Http\OtlpHttpEndpointsBuilder.cs (4)
94
if (string.Equals(mt.MediaType,
ProtobufContentType
, StringComparison.OrdinalIgnoreCase))
107
logger.LogDebug("OTLP HTTP request with unsupported content type '{ContentType}' was rejected. Only '{SupportedContentType}' is supported.", httpContext.Request.ContentType,
ProtobufContentType
);
114
Message: $"Content type '{httpContext.Request.ContentType}' is not supported. Only '{
ProtobufContentType
}' is supported.");
228
httpContext.Response.ContentType =
ProtobufContentType
;
Aspire.Dashboard.Tests (17)
Integration\OtlpHttpServiceTests.cs (15)
50
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
59
Assert.Equal(OtlpHttpEndpointsBuilder.
ProtobufContentType
, responseMessage.Content.Headers.GetValues("content-type").Single());
76
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
123
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
147
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
175
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
188
Assert.Equal(OtlpHttpEndpointsBuilder.
ProtobufContentType
, responseMessage.Content.Headers.GetValues("content-type").Single());
213
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
318
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
344
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
353
Assert.Equal(OtlpHttpEndpointsBuilder.
ProtobufContentType
, responseMessage.Content.Headers.GetValues("content-type").Single());
373
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
382
Assert.Equal(OtlpHttpEndpointsBuilder.
ProtobufContentType
, responseMessage.Content.Headers.GetValues("content-type").Single());
402
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
411
Assert.Equal(OtlpHttpEndpointsBuilder.
ProtobufContentType
, responseMessage.Content.Headers.GetValues("content-type").Single());
Integration\StartupTests.cs (2)
525
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
532
Assert.Equal(OtlpHttpEndpointsBuilder.
ProtobufContentType
, responseMessage.Content.Headers.GetValues("content-type").Single());