Skip to content

Commit

Permalink
return a null instead of application/json when no content types are s…
Browse files Browse the repository at this point in the history
…et (#5941)

* return a null instead of application/json when no content types are set

* update petstore sample

Co-authored-by: William Cheng <[email protected]>
  • Loading branch information
FaFre and wing328 authored Apr 18, 2020
1 parent cb50ad5 commit e47739d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ namespace {{packageName}}.Client
public static String SelectHeaderContentType(String[] contentTypes)
{
if (contentTypes.Length == 0)
return "application/json";
return null;
foreach (var contentType in contentTypes)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public static byte[] ReadAsBytes(Stream inputStream)
public static String SelectHeaderContentType(String[] contentTypes)
{
if (contentTypes.Length == 0)
return "application/json";
return null;

foreach (var contentType in contentTypes)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public static byte[] ReadAsBytes(Stream inputStream)
public static String SelectHeaderContentType(String[] contentTypes)
{
if (contentTypes.Length == 0)
return "application/json";
return null;

foreach (var contentType in contentTypes)
{
Expand Down

0 comments on commit e47739d

Please sign in to comment.