21 references to ProtobufContentType
Aspire.Dashboard (4)
Otlp\Http\OtlpHttpEndpointsBuilder.cs (4)
92
if (string.Equals(mt.MediaType,
ProtobufContentType
, StringComparison.OrdinalIgnoreCase))
106
logger.LogDebug("OTLP HTTP request with unsupported content type '{ContentType}' was rejected. Only '{SupportedContentType}' is supported.", httpContext.Request.ContentType,
ProtobufContentType
);
113
Message: $"Content type '{httpContext.Request.ContentType}' is not supported. Only '{
ProtobufContentType
}' is supported.");
179
httpContext.Response.ContentType =
ProtobufContentType
;
Aspire.Dashboard.Tests (17)
Integration\OtlpHttpServiceTests.cs (15)
47
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
56
Assert.Equal(OtlpHttpEndpointsBuilder.
ProtobufContentType
, responseMessage.Content.Headers.GetValues("content-type").Single());
73
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
117
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
141
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
169
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
182
Assert.Equal(OtlpHttpEndpointsBuilder.
ProtobufContentType
, responseMessage.Content.Headers.GetValues("content-type").Single());
207
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
312
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
338
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
347
Assert.Equal(OtlpHttpEndpointsBuilder.
ProtobufContentType
, responseMessage.Content.Headers.GetValues("content-type").Single());
367
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
376
Assert.Equal(OtlpHttpEndpointsBuilder.
ProtobufContentType
, responseMessage.Content.Headers.GetValues("content-type").Single());
396
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
405
Assert.Equal(OtlpHttpEndpointsBuilder.
ProtobufContentType
, responseMessage.Content.Headers.GetValues("content-type").Single());
Integration\StartupTests.cs (2)
443
content.Headers.TryAddWithoutValidation("content-type", OtlpHttpEndpointsBuilder.
ProtobufContentType
);
450
Assert.Equal(OtlpHttpEndpointsBuilder.
ProtobufContentType
, responseMessage.Content.Headers.GetValues("content-type").Single());