示例#1
0
 protected ClientResponse handleExpired(
     ClientExecutionContext ctx, ClientRequest request, BrowserCache.Entry entry)
     throws Exception {
   ClientResponse response = ctx.proceed();
   if (response.getStatus() == Response.Status.NOT_MODIFIED.getStatusCode()) {
     return updateOnNotModified(request, entry, (BaseClientResponse) response);
   }
   return cache(request, response);
 }
示例#2
0
 @Test
 public void should_add_exist_TagDescription_fail() {
   String json = "{\"tag\":\"xxx\"}";
   ClientResponse response =
       resource
           .path("tag/add")
           .accept(MediaType.APPLICATION_JSON)
           .type(MediaType.APPLICATION_JSON)
           .post(ClientResponse.class, json);
   assertThat(response.getStatus()).isEqualTo(Response.Status.NOT_MODIFIED.getStatusCode());
 }