We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1bf71b commit f958b0cCopy full SHA for f958b0c
test/RestSharp.Tests/RestContentTests.cs
@@ -12,4 +12,17 @@ public void RestContent_CaseInsensitiveHeaders() {
12
13
httpContent.Headers.ContentType!.MediaType.Should().Be(myContentType);
14
}
15
+
16
+ [Fact]
17
+ public void RestContent_supports_manual_json_body() {
18
+ const string myContentType = "application/json";
19
+ const string myJsonString = "[]";
20
21
+ var request = new RestRequest("resource").AddParameter(myContentType, myJsonString, ParameterType.RequestBody);
22
+ var content = new RequestContent(new RestClient(), request);
23
24
+ var httpContent = content.BuildContent();
25
26
+ httpContent.Headers.ContentType!.MediaType.Should().Be(myContentType);
27
+ }
28
0 commit comments