Commits

Arkadi Shishlov committed 70f5bfc Draft

Use http header name constant

Comments (0)

Files changed (1)

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);
             }