public HttpRequest(final URL url,final String method) throws HttpRequestException {
  try {
    connection=(HttpURLConnection)url.openConnection();
    connection.setRequestMethod(method);
  }
 catch (  IOException e) {
    throw new HttpRequestException(e);
  }
}

public HttpRequest ( final URL url , final String method ) throws HttpRequestException { try { connection = ( HttpURLConnection ) url . openConnection ( ) ; connection . setRequestMethod ( method ) ; } catch ( IOException e ) { throw new HttpRequestException ( e ) ; } }
create http connection wrapper
