Sunday, April 26, 2015

Accept Header and Content Types

The Accept header tells the server what your client wants in the response.

The Content-Type header tells the server what the client sends in the request.

httpClient.DefaultRequestHeaders.Add("Accept", "application/json");
httpClient.DefaultRequestHeaders.Add("Content-Type", "application/json");

Technorati Tags: ,

No comments:

Post a Comment