private void prepareHttpRequest(
            HttpURLConnection connnection,
            Map<String, String> headers,
            byte[] bytes) {

        // set all cookies for request
        connnection.setRequestProperty(RESTConstants.COOKIE, getCookies());

        setConnectionHeaders(connnection, headers);

        setConnectionData(connnection, bytes);
    }
private void prepareHttpRequest ( HttpURLConnection connnection , Map < String , String > headers , byte [ ] bytes ) { connnection . setRequestProperty ( RESTConstants . COOKIE , getCookies ( ) ) ; setConnectionHeaders ( connnection , headers ) ; setConnectionData ( connnection , bytes ) ; }
@param connnection
connection to set the headers and bytes in
@param headers
to use in the request, such as content-type
@param bytes
the actual data to post in the connection.