If you take a look inside the HttpConnectionHandler.java class you’ll see those headers from the encoding formats are set using the setPostHeaders() method. If you want to customize that routine, I’d guess the simplest way would be to create a class which extends HttpConnectionHandler and implements that method. Something like this:
public class HttpConnectionHandlerCustom extends HttpConnectionHandler
{
public static final int Encoding_JSON = 4;
public void setPostHeaders() throws IOException
{
super();
if (init_encoding_format == Encoding_JSON)
{
conn.setRequestProperty ("Content-Type", "application/json");
conn.setRequestProperty ("Accept", "*/*");
}
}
}
I’ll also look to see if we can add this to our current list where appropriate.