150 references to StringContent
aspire (1)
Aspire.Cli.Tests (80)
Commands\ExportCommandTests.cs (5)
247Content = new StringContent(resourcesJson, System.Text.Encoding.UTF8, "application/json")
254Content = new StringContent(BuildLogsJson(), System.Text.Encoding.UTF8, "application/json")
261Content = new StringContent(BuildTracesJson(), System.Text.Encoding.UTF8, "application/json")
904Content = new StringContent(resourcesJson, System.Text.Encoding.UTF8, "application/json")
914Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json")
Commands\TelemetryCommandTests.cs (6)
332Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
349Content = new StringContent(body!, System.Text.Encoding.UTF8, contentType!)
389Content = new StringContent("""{"apiKey":"test-api-key-123"}""", System.Text.Encoding.UTF8, "application/json")
406Content = new StringContent("""{"apiKey":null}""", System.Text.Encoding.UTF8, "application/json")
482Content = new StringContent("""{"apiKey":"key"}""", System.Text.Encoding.UTF8, "application/json")
499Content = new StringContent("""{"apiKey":"key"}""", System.Text.Encoding.UTF8, "application/json")
Commands\TelemetryLogsCommandTests.cs (15)
195Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
203Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json")
247Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
255Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json")
339Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
377Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
420Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
493Content = new StringContent("<html></html>", System.Text.Encoding.UTF8, "text/html")
530Content = new StringContent("""{"apiKey":"test-key"}""", System.Text.Encoding.UTF8, "application/json")
537Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
545Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json")
621Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
628Content = new StringContent(responseJson, System.Text.Encoding.UTF8, "application/json")
685Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
694Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json")
Commands\TelemetrySpansCommandTests.cs (10)
168Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
176Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json")
239Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
281Content = new StringContent("<html></html>", System.Text.Encoding.UTF8, "text/html")
355Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
362Content = new StringContent(responseJson, System.Text.Encoding.UTF8, "application/json")
424Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
433Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json")
471Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
480Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json")
Commands\TelemetryTracesCommandTests.cs (15)
108Content = new StringContent(resourcesJson, System.Text.Encoding.UTF8, "application/json")
112Content = new StringContent(tracesJson, System.Text.Encoding.UTF8, "application/json")
195Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
199Content = new StringContent(tracesJson, System.Text.Encoding.UTF8, "application/json")
413Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
421Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json")
484Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
559Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
566Content = new StringContent(responseJson, System.Text.Encoding.UTF8, "application/json")
643Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
650Content = new StringContent(responseJson, System.Text.Encoding.UTF8, "application/json")
690Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
699Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json")
737Content = new StringContent("[]", System.Text.Encoding.UTF8, "application/json")
746Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json")
Mcp\ListStructuredLogsToolTests.cs (8)
160Content = new StringContent(resourcesResponse, System.Text.Encoding.UTF8, "application/json")
167Content = new StringContent(apiResponse, System.Text.Encoding.UTF8, "application/json")
254Content = new StringContent(resourcesResponse, System.Text.Encoding.UTF8, "application/json")
261Content = new StringContent(apiResponse, System.Text.Encoding.UTF8, "application/json")
309Content = new StringContent(resourcesResponse, System.Text.Encoding.UTF8, "application/json")
316Content = new StringContent(emptyLogsJson, System.Text.Encoding.UTF8, "application/json")
448Content = new StringContent(resourcesResponse, System.Text.Encoding.UTF8, "application/json")
455Content = new StringContent(apiResponse, System.Text.Encoding.UTF8, "application/json")
Mcp\ListTracesToolTests.cs (10)
132Content = new StringContent(resourcesResponse, System.Text.Encoding.UTF8, "application/json")
139Content = new StringContent(apiResponse, System.Text.Encoding.UTF8, "application/json")
239Content = new StringContent(resourcesResponse, System.Text.Encoding.UTF8, "application/json")
246Content = new StringContent(apiResponse, System.Text.Encoding.UTF8, "application/json")
294Content = new StringContent(resourcesResponse, System.Text.Encoding.UTF8, "application/json")
301Content = new StringContent(emptyTracesJson, System.Text.Encoding.UTF8, "application/json")
398Content = new StringContent(resourcesResponse, System.Text.Encoding.UTF8, "application/json")
404Content = new StringContent(apiResponse, System.Text.Encoding.UTF8, "application/json")
490Content = new StringContent(resourcesResponse, System.Text.Encoding.UTF8, "application/json")
497Content = new StringContent(apiResponse, System.Text.Encoding.UTF8, "application/json")
Aspire.Dashboard.Tests (9)
Integration\OtlpHttpJsonTests.cs (9)
507var content = new StringContent(ExampleTraceJson, Encoding.UTF8, OtlpHttpEndpointsBuilder.JsonContentType);
567var content = new StringContent(ExampleLogsJson, Encoding.UTF8, OtlpHttpEndpointsBuilder.JsonContentType);
644var content = new StringContent(ExampleEventsJson, Encoding.UTF8, OtlpHttpEndpointsBuilder.JsonContentType);
694var content = new StringContent(ExampleMetricsJson, Encoding.UTF8, OtlpHttpEndpointsBuilder.JsonContentType);
746var content = new StringContent(MetricsJsonWithNumericBucketCounts, Encoding.UTF8, OtlpHttpEndpointsBuilder.JsonContentType);
836var content = new StringContent(ExampleLogsJson, Encoding.UTF8, OtlpHttpEndpointsBuilder.JsonContentType);
864var content = new StringContent(ExampleLogsJson, Encoding.UTF8, OtlpHttpEndpointsBuilder.JsonContentType);
882var content = new StringContent("{ invalid json }", Encoding.UTF8, OtlpHttpEndpointsBuilder.JsonContentType);
900var content = new StringContent("{}", Encoding.UTF8, OtlpHttpEndpointsBuilder.JsonContentType);
Aspire.Deployment.EndToEnd.Tests (1)
Aspire.Hosting (1)
Aspire.Hosting.Azure.Tests (2)
Aspire.Hosting.Foundry (1)
Aspire.Hosting.Foundry.Tests (3)
Aspire.Hosting.GitHub.Models (1)
Aspire.Hosting.Seq.Tests (1)
Aspire.Hosting.Tests (5)
WithHttpCommandTests.cs (5)
52Content = new StringContent("""{"token":"abc123"}""", Encoding.UTF8, "application/json")
67Content = new StringContent("""{"token":"abc123"}""", Encoding.UTF8, "application/json")
86Content = new StringContent("invalid request", Encoding.UTF8, "text/plain")
580? new StringContent(responseBody, Encoding.UTF8, mediaType)
763requestContext.Request.Content = new StringContent(message, Encoding.UTF8, "text/plain");
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Microsoft.Extensions.AI.Integration.Tests (1)
Microsoft.Extensions.AI.OpenAI.Tests (10)
Microsoft.Extensions.Http.Diagnostics.Tests (29)
Logging\HttpClientLoggerTest.cs (17)
87Content = new StringContent(input, Encoding.UTF8, TextPlain)
125Content = new StringContent(input, Encoding.UTF8, TextPlain)
187Content = new StringContent(requestContent, Encoding.UTF8, TextPlain)
196Content = new StringContent(responseContent, Encoding.UTF8, TextPlain),
313Content = new StringContent(requestContent, Encoding.UTF8, TextPlain)
320Content = new StringContent(responseContent, Encoding.UTF8, TextPlain),
420Content = new StringContent(requestContent, Encoding.UTF8, TextPlain)
428Content = new StringContent(responseContent, Encoding.UTF8, TextPlain),
517Content = new StringContent(requestContent, Encoding.UTF8, TextPlain)
525Content = new StringContent(responseContent, Encoding.UTF8, TextPlain),
633Content = new StringContent(requestContent, Encoding.UTF8, TextPlain)
640Content = new StringContent(responseContent, Encoding.UTF8, TextPlain),
726Content = new StringContent(_fixture.Create<string>(), Encoding.UTF8, TextPlain)
769Content = new StringContent(_fixture.Create<string>(), Encoding.UTF8, TextPlain)
807Content = new StringContent(_fixture.Create<string>(), Encoding.UTF8, TextPlain)
851Content = new StringContent(_fixture.Create<string>(), Encoding.UTF8, TextPlain)
998Content = new StringContent("request_content", Encoding.UTF8, TextPlain)
Logging\HttpRequestBodyReaderTest.cs (6)
41Content = new StringContent(input, Encoding.UTF8, "text/plain"),
85Content = new StringContent(input, Encoding.UTF8, contentType),
106Content = new StringContent(input, Encoding.UTF8, "text/plain"),
134Content = new StringContent(input, Encoding.UTF8, "text/plain"),
158Content = new StringContent(input, Encoding.UTF8, "text/plain"),
232Content = new StringContent("content", Encoding.UTF8, "text/plain"),
Microsoft.Extensions.Http.Resilience.Tests (1)
System.Net.Http (2)