/** * Extracts the status line from the supplied Java API {@link java.net.CacheResponse}. As per the * spec, the status line is held as the header with the null key. Throws a {@link * ProtocolException} if there is no status line. */ private static String extractStatusLine(CacheResponse javaResponse) throws IOException { Map<String, List<String>> javaResponseHeaders = javaResponse.getHeaders(); return extractStatusLine(javaResponseHeaders); }
StatusLine statusLine = StatusLine.parse(extractStatusLine(javaResponse)); okResponseBuilder.protocol(statusLine.protocol); okResponseBuilder.code(statusLine.code);
StatusLine statusLine = StatusLine.parse(extractStatusLine(httpUrlConnection)); okResponseBuilder.protocol(statusLine.protocol); okResponseBuilder.code(statusLine.code);
/** * Extracts the status line from the supplied Java API {@link java.net.CacheResponse}. As per the * spec, the status line is held as the header with the null key. Throws a {@link * ProtocolException} if there is no status line. */ private static String extractStatusLine(CacheResponse javaResponse) throws IOException { Map<String, List<String>> javaResponseHeaders = javaResponse.getHeaders(); return extractStatusLine(javaResponseHeaders); }
StatusLine statusLine = StatusLine.parse(extractStatusLine(javaResponse)); okResponseBuilder.protocol(statusLine.protocol); okResponseBuilder.code(statusLine.code);
StatusLine statusLine = StatusLine.parse(extractStatusLine(httpUrlConnection)); okResponseBuilder.protocol(statusLine.protocol); okResponseBuilder.code(statusLine.code);