@Override public String getHeaderFieldKey(int position) { try { Headers headers = getHeaders(); if (position < 0 || position >= headers.size()) return null; return headers.name(position); } catch (IOException e) { return null; } }
/** * Returns the value of the field at {@code position}. Returns null if there are fewer than {@code * position} headers. */ @Override public String getHeaderField(int position) { try { Headers headers = getHeaders(); if (position < 0 || position >= headers.size()) return null; return headers.value(position); } catch (IOException e) { return null; } }
@Override public Map<String, List<String>> getHeaderFields() { try { return JavaNetHeaders.toMultimap(getHeaders(), StatusLine.get(getResponse(true)).toString()); } catch (IOException e) { return Collections.emptyMap(); } }
/** * Returns the value of the field corresponding to the {@code fieldName}, or null if there is no * such field. If the field has multiple values, the last value is returned. */ @Override public String getHeaderField(String fieldName) { try { return fieldName == null ? StatusLine.get(getResponse(true)).toString() : getHeaders().get(fieldName); } catch (IOException e) { return null; } }
@Override public String getHeaderFieldKey(int position) { try { Headers headers = getHeaders(); if (position < 0 || position >= headers.size()) return null; return headers.name(position); } catch (IOException e) { return null; } }
@Override public String getHeaderFieldKey(int position) { try { Headers headers = getHeaders(); if (position < 0 || position >= headers.size()) return null; return headers.name(position); } catch (IOException e) { return null; } }
@Override public String getHeaderFieldKey(int position) { try { Headers headers = getHeaders(); if (position < 0 || position >= headers.size()) return null; return headers.name(position); } catch (IOException e) { return null; } }
/** * Returns the value of the field at {@code position}. Returns null if there are fewer than {@code * position} headers. */ @Override public String getHeaderField(int position) { try { Headers headers = getHeaders(); if (position < 0 || position >= headers.size()) return null; return headers.value(position); } catch (IOException e) { return null; } }
/** * Returns the value of the field at {@code position}. Returns null if there are fewer than {@code * position} headers. */ @Override public String getHeaderField(int position) { try { Headers headers = getHeaders(); if (position < 0 || position >= headers.size()) return null; return headers.value(position); } catch (IOException e) { return null; } }
/** * Returns the value of the field at {@code position}. Returns null if there are fewer than {@code * position} headers. */ @Override public String getHeaderField(int position) { try { Headers headers = getHeaders(); if (position < 0 || position >= headers.size()) return null; return headers.value(position); } catch (IOException e) { return null; } }
@Override public Map<String, List<String>> getHeaderFields() { try { return JavaNetHeaders.toMultimap(getHeaders(), StatusLine.get(getResponse(true)).toString()); } catch (IOException e) { return Collections.emptyMap(); } }
@Override public Map<String, List<String>> getHeaderFields() { try { return JavaNetHeaders.toMultimap(getHeaders(), StatusLine.get(getResponse(true)).toString()); } catch (IOException e) { return Collections.emptyMap(); } }
@Override public Map<String, List<String>> getHeaderFields() { try { return JavaNetHeaders.toMultimap(getHeaders(), StatusLine.get(getResponse(true)).toString()); } catch (IOException e) { return Collections.emptyMap(); } }
/** * Returns the value of the field corresponding to the {@code fieldName}, or null if there is no * such field. If the field has multiple values, the last value is returned. */ @Override public String getHeaderField(String fieldName) { try { return fieldName == null ? StatusLine.get(getResponse(true)).toString() : getHeaders().get(fieldName); } catch (IOException e) { return null; } }
/** * Returns the value of the field corresponding to the {@code fieldName}, or null if there is no * such field. If the field has multiple values, the last value is returned. */ @Override public String getHeaderField(String fieldName) { try { return fieldName == null ? StatusLine.get(getResponse(true)).toString() : getHeaders().get(fieldName); } catch (IOException e) { return null; } }
/** * Returns the value of the field corresponding to the {@code fieldName}, or null if there is no * such field. If the field has multiple values, the last value is returned. */ @Override public String getHeaderField(String fieldName) { try { return fieldName == null ? StatusLine.get(getResponse(true)).toString() : getHeaders().get(fieldName); } catch (IOException e) { return null; } }