code: private HttpURLConnection getConnection(String uri, String postJson, String token) throws IOException {
  		int tries = 0;
  		IOException last = null;
  
  		while (tries++ <= retries) {
  			try {
  				return getConnectionOnce(uri, postJson, token);
  			} catch (IOException ex) {
  				last = ex;
  			}
  		}
  
  		throw last;
  	}
docs: Common functionality for posting data.  Smart about retries.
  
  WePay's API is not strictly RESTful, so all requests are sent as POST unless there are no request values