Sending JSON with HttpRequest

How can i set a request header using HTTPRequst that my content is in JSON format? I have to set the Content-Type: application/json; charset=utf-8 in the request header for the server to read my data? Can anyone show me how this is done ?

try this:

HttpRequest* request = new (std :: nothrow) HttpRequest();
std::vector<std::string> headers;
headers.push_back("Content-Type: application/json; charset=utf-8");
request->setHeaders(headers);