List of usage examples for javax.net.ssl HttpsURLConnection getRequestProperty
public String getRequestProperty(String key)
From source file:tetujin.nikeapi.core.JNikeLowLevelAPI.java
/** * /*from w ww.j av a 2 s. c o m*/ * @param con ?HttpsURLConnection * @return con option??HttpsURLConnection */ protected HttpsURLConnection setHttpHeader(HttpsURLConnection con) { try { con.setRequestMethod(this.method); con.setDoOutput(true); con.setInstanceFollowRedirects(false); con.setRequestProperty("Accept-Language", this.lang); con.setRequestProperty("Accept", this.accept); con.setRequestProperty("appid", this.appid); System.out.println("Accept: " + con.getRequestProperty("Accept")); System.out.println("appid: " + con.getRequestProperty("appid")); return con; } catch (ProtocolException e) { e.printStackTrace(); return con; } }