Commits

Arkadi Shishlov committed 70f5bfc Draft

Use http header name constant

  • Participants
  • Parent commits dae7587

Comments (0)

Files changed (1)

File src/main/java/ra/Client.java

                         null)
                         .setAssignedId(
                                 resp.getStatus().getCode() == HttpURLConnection.HTTP_CREATED
-                                        && HttpHeaders.getHeader(resp, "Content-Type", "").startsWith("text/plain")
+                                        && HttpHeaders.getHeader(resp, HttpHeaders.Names.CONTENT_TYPE, "").startsWith("text/plain")
                                         && !reply.isEmpty() ?
                                         reply : null);
             }