Skip to content

Commit 0977c24

Browse files
fix media type on empty request body (#5068)
1 parent 71ae244 commit 0977c24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NSwag.CodeGeneration.CSharp/Templates/Client.Class.liquid

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@
286286
request_.Content = content_;
287287
{% endif -%}
288288
{% elsif operation.IsGetOrDeleteOrHead == false -%}
289-
request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "{{ operation.Produces }}");
289+
request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "{{ operation.Consumes }}");
290290
{% endif -%}
291291
{% endif -%}
292292
request_.Method = new System.Net.Http.HttpMethod("{{ operation.HttpMethodUpper | upcase }}");

0 commit comments

Comments
 (0)