public int code() throws HttpRequestException {
  try {
    closeOutput();
    return connection.getResponseCode();
  }
 catch (  IOException e) {
    throw new HttpRequestException(e);
  }
}

public int code ( ) throws HttpRequestException { try { closeOutput ( ) ; return connection . getResponseCode ( ) ; } catch ( IOException e ) { throw new HttpRequestException ( e ) ; } }
get the status code of the response
