Here you can find the source of putPOST(HttpURLConnection h, String query)
public static void putPOST(HttpURLConnection h, String query) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.io.OutputStream; import java.net.HttpURLConnection; public class Main { public static String C_ENC = "UTF-8"; public static void putPOST(HttpURLConnection h, String query) throws IOException { OutputStream output = null; output = h.getOutputStream();/*from ww w. j a va 2 s. c o m*/ output.write(query.getBytes(C_ENC)); } }