Here you can find the source of addHeader(HttpURLConnection conn, String headerName, String value)
private static void addHeader(HttpURLConnection conn, String headerName, String value)
//package com.java2s; //License from project: Open Source License import java.net.*; public class Main { private static void addHeader(HttpURLConnection conn, String headerName, String value) { conn.setRequestProperty(headerName, value); }/* www. ja v a 2 s. com*/ }