@Test public void shouldReturnEmptyWhenNoneContentTypeIsDeclared() { Headers headers = new ApacheHeaders(response, client); assertEquals("", headers.getFirst("Content-Type")); }
public String getFirst(String key) { Header[] headers = response.getHeaders(key); return headers != null && headers.length > 0 ? get(key).get(0) : ""; }
ApacheHeaders implements Headers { public String getFirst(String key) { Header[] headers = response.getHeaders(key); return headers != null && headers.length > 0 ? get(key).get(0) : ""; } }
ApacheHeaders implements Headers { public String getFirst(String key) { Header[] headers = response.getHeaders(key); return headers != null && headers.length > 0 ? get(key).get(0) : ""; } ApacheHeaders(HttpResponse response, RestClient client); }
ApacheHeaders implements Headers { public String getFirst(String key) { Header[] headers = response.getHeaders(key); return headers != null && headers.length > 0 ? get(key).get(0) : ""; } ApacheHeaders(HttpResponse response, RestClient client); String getMain(String key); List<String> get(String key); String getFirst(String key); List<Link> getLinks(); Link getLink(String rel); Iterator<br.com.caelum.restfulie.http.Header> iterator(); }
ApacheHeaders implements Headers { public String getFirst(String key) { Header[] headers = response.getHeaders(key); return headers != null && headers.length > 0 ? get(key).get(0) : ""; } ApacheHeaders(HttpResponse response, RestClient client); String getMain(String key); List<String> get(String key); String getFirst(String key); List<Link> getLinks(); Link getLink(String rel); Iterator<br.com.caelum.restfulie.http.Header> iterator();  }