ClaimBuilder claims = new ClaimBuilder();
claims.putResource(Resource.NEW_REG);
if (!contacts.isEmpty()) {
claims.put("contact", contacts);
}
<BUG>int rc = conn.sendSignedRequest(session.resourceUri(Resource.NEW_REG), claims, session);
if (rc != HttpURLConnection.HTTP_CREATED) {
conn.throwAcmeException();
}</BUG>
URI location = conn.getLocation();

ClaimBuilder claims = new ClaimBuilder();
claims.putResource(Resource.NEW_REG);
if (!contacts.isEmpty()) {
claims.put("contact", contacts);
}
conn.sendSignedRequest(session.resourceUri(Resource.NEW_REG), claims, session);
conn.accept(HttpURLConnection.HTTP_CREATED);
URI location = conn.getLocation();
