Java HTTP Post putPOST(HttpURLConnection h, String query)

Here you can find the source of putPOST(HttpURLConnection h, String query)

Description

put POST

License

Open Source License

Declaration

public static void putPOST(HttpURLConnection h, String query)
            throws IOException 

Method Source Code

//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));
    }
}

Related

  1. postJSON(JSONObject job, HttpURLConnection conn)
  2. postRaw(URL url, String params)
  3. postURL(final URL url, final String request)
  4. put(String url, String content)
  5. put(URL host, String endpoint, String customer, String name, String version, InputStream in)
  6. requestPost(final String remoteUrl, final byte[] content)
  7. sendJson(URL url, String method, String data)
  8. sendJsonData(final HttpURLConnection connection, final String data)
  9. sendPost(String link, String urlParameters)