/** * Get a response header * * @param name * @return response header * @throws HttpRequestException */ public String header(final String name) throws HttpRequestException { closeOutputQuietly(); return connection.getHeaderField(name); }
/** * Get all the response headers * * @return map of response header names to their value(s) * @throws HttpRequestException */ public Map<String, List<String>> headers() throws HttpRequestException { closeOutputQuietly(); return connection.getHeaderFields(); }
/** * Get all the response headers * * @return map of response header names to their value(s) * @throws HttpRequestException */ public Map<String, List<String>> headers() throws HttpRequestException { closeOutputQuietly(); return connection.getHeaderFields(); }
/** * Get a response header * * @param name * @return response header * @throws HttpRequestException */ public String header(final String name) throws HttpRequestException { closeOutputQuietly(); return connection.getHeaderField(name); }
/** * Get all the response headers * * @return map of response header names to their value(s) * @throws HttpRequestException */ public Map<String, List<String>> headers() throws HttpRequestException { closeOutputQuietly(); return getConnection().getHeaderFields(); }
/** * Get all the response headers * * @return map of response header names to their value(s) * @throws HttpRequestException */ public Map<String, List<String>> headers() throws HttpRequestException { closeOutputQuietly(); return getConnection().getHeaderFields(); }
/** * Get a response header * * @param name * @return response header * @throws HttpRequestException */ public String header(final String name) throws HttpRequestException { closeOutputQuietly(); return getConnection().getHeaderField(name); }
/** * Get a response header * * @param name * @return response header * @throws HttpRequestException */ public String header(final String name) throws HttpRequestException { closeOutputQuietly(); return getConnection().getHeaderField(name); }
/** * Get a date header from the response falling back to returning the given * default value if the header is missing or parsing fails * * @param name * @param defaultValue * @return date, default value on failures * @throws HttpRequestException */ public long dateHeader(final String name, final long defaultValue) throws HttpRequestException { closeOutputQuietly(); return connection.getHeaderFieldDate(name, defaultValue); }
/** * Get a date header from the response falling back to returning the given * default value if the header is missing or parsing fails * * @param name * @param defaultValue * @return date, default value on failures * @throws HttpRequestException */ public long dateHeader(final String name, final long defaultValue) throws HttpRequestException { closeOutputQuietly(); return connection.getHeaderFieldDate(name, defaultValue); }
/** * Get an integer header value from the response falling back to the given * default value if the header is missing or if parsing fails * * @param name * @param defaultValue * @return header value as an integer, default value when missing or parsing * fails * @throws HttpRequestException */ public int intHeader(final String name, final int defaultValue) throws HttpRequestException { closeOutputQuietly(); return connection.getHeaderFieldInt(name, defaultValue); }
/** * Get an integer header value from the response falling back to the given * default value if the header is missing or if parsing fails * * @param name * @param defaultValue * @return header value as an integer, default value when missing or parsing * fails * @throws HttpRequestException */ public int intHeader(final String name, final int defaultValue) throws HttpRequestException { closeOutputQuietly(); return connection.getHeaderFieldInt(name, defaultValue); }
/** * Get a date header from the response falling back to returning the given * default value if the header is missing or parsing fails * * @param name * @param defaultValue * @return date, default value on failures * @throws HttpRequestException */ public long dateHeader(final String name, final long defaultValue) throws HttpRequestException { closeOutputQuietly(); return getConnection().getHeaderFieldDate(name, defaultValue); }
/** * Get a date header from the response falling back to returning the given * default value if the header is missing or parsing fails * * @param name * @param defaultValue * @return date, default value on failures * @throws HttpRequestException */ public long dateHeader(final String name, final long defaultValue) throws HttpRequestException { closeOutputQuietly(); return getConnection().getHeaderFieldDate(name, defaultValue); }
/** * Get an integer header value from the response falling back to the given * default value if the header is missing or if parsing fails * * @param name * @param defaultValue * @return header value as an integer, default value when missing or parsing * fails * @throws HttpRequestException */ public int intHeader(final String name, final int defaultValue) throws HttpRequestException { closeOutputQuietly(); return getConnection().getHeaderFieldInt(name, defaultValue); }
/** * Get an integer header value from the response falling back to the given * default value if the header is missing or if parsing fails * * @param name * @param defaultValue * @return header value as an integer, default value when missing or parsing * fails * @throws HttpRequestException */ public int intHeader(final String name, final int defaultValue) throws HttpRequestException { closeOutputQuietly(); return getConnection().getHeaderFieldInt(name, defaultValue); }