Permalink
Browse files

Use header parse, closes #1649

  • Loading branch information...
RSuter committed Oct 4, 2018
1 parent 225dc37 commit f7aef821e047196211b72da46cfc0833bbe3ea1d
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/NSwag.CodeGeneration.CSharp/Templates/Client.Class.liquid
@@ -185,7 +185,7 @@
{% endif -%}
request_.Method = new System.Net.Http.HttpMethod("{{ operation.HttpMethodUpper | upcase }}");
{% if operation.HasResultType and operation.HasAcceptHeaderParameterParameter == false -%}
request_.Headers.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("{{ operation.Produces }}"));
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("{{ operation.Produces }}"));
{% endif -%}
PrepareRequest(client_, request_, urlBuilder_);

0 comments on commit f7aef82

Please sign in to comment.