Skip to content

Commit b1a982d

Browse files
committed
Accept json
1 parent 1d9bce4 commit b1a982d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

HttpReq/Program.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Linq;
44
using System.Net;
55
using System.Net.Http;
6+
using System.Net.Http.Headers;
67
using System.Threading;
78
using System.Threading.Tasks;
89

@@ -82,6 +83,8 @@ static async Task SendRequestsAsync(string url, int maxIterations, int countPerI
8283
{
8384
Timeout = TimeSpan.FromSeconds(120)
8485
};
86+
87+
_clients[i].DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
8588
}
8689

8790
var tasks = new List<Task>();

0 commit comments

Comments
 (0)