Java HTTP Header addHeader(HttpURLConnection conn, String headerName, String value)

Here you can find the source of addHeader(HttpURLConnection conn, String headerName, String value)

Description

add Header

License

Open Source License

Declaration

private static void addHeader(HttpURLConnection conn, String headerName, String value) 

Method Source Code

//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*/
}

Related

  1. addCustomHeaders(HttpURLConnection conn, Map headers)
  2. addHeadersToRequest(HttpURLConnection request, Map headers)
  3. copyHttpHeaders(@Nonnull final HttpURLConnection aConn, @Nonnull final InternetHeaders aHeaders)
  4. createHttpConnection(URL endpointUrl, String httpMethod, Map headers)
  5. delete(String url, Map headers)