@Test public void appendsViaHeaderValueAtEndOfListInResponse() throws Exception { LiveHttpResponse response = Mono.from(interceptor.intercept(get("/foo").build(), returnsResponse(response() .header(VIA, "1.0 ricky, 1.1 mertz, 1.0 lucy") .build()))).block(); assertThat(response.headers().get(VIA), isValue("1.0 ricky, 1.1 mertz, 1.0 lucy, 1.1 styx")); }
@Override public Eventual<LiveHttpResponse> intercept(LiveHttpRequest request, Chain chain) { LiveHttpRequest newRequest = request.newBuilder() .header(VIA, viaHeader(request)) .build(); return chain.proceed(newRequest) .map(response -> response.newBuilder() .header(VIA, viaHeader(response)) .build()); }
ViaHeaderAppendingInterceptor implements HttpInterceptor { @Override public Eventual<LiveHttpResponse> intercept(LiveHttpRequest request, Chain chain) { LiveHttpRequest newRequest = request.newBuilder() .header(VIA, viaHeader(request)) .build(); return chain.proceed(newRequest) .map(response -> response.newBuilder() .header(VIA, viaHeader(response)) .build()); } }
ViaHeaderAppendingInterceptor implements HttpInterceptor { @Override public Eventual<LiveHttpResponse> intercept(LiveHttpRequest request, Chain chain) { LiveHttpRequest newRequest = request.newBuilder() .header(VIA, viaHeader(request)) .build(); return chain.proceed(newRequest) .map(response -> response.newBuilder() .header(VIA, viaHeader(response)) .build()); } ViaHeaderAppendingInterceptor();  ViaHeaderAppendingInterceptor(final String via); }
ViaHeaderAppendingInterceptor implements HttpInterceptor { @Override public Eventual<LiveHttpResponse> intercept(LiveHttpRequest request, Chain chain) { LiveHttpRequest newRequest = request.newBuilder() .header(VIA, viaHeader(request)) .build(); return chain.proceed(newRequest) .map(response -> response.newBuilder() .header(VIA, viaHeader(response)) .build()); } ViaHeaderAppendingInterceptor();  ViaHeaderAppendingInterceptor(final String via); @Override Eventual<LiveHttpResponse> intercept(LiveHttpRequest request, Chain chain); }
ViaHeaderAppendingInterceptor implements HttpInterceptor { @Override public Eventual<LiveHttpResponse> intercept(LiveHttpRequest request, Chain chain) { LiveHttpRequest newRequest = request.newBuilder() .header(VIA, viaHeader(request)) .build(); return chain.proceed(newRequest) .map(response -> response.newBuilder() .header(VIA, viaHeader(response)) .build()); } ViaHeaderAppendingInterceptor();  ViaHeaderAppendingInterceptor(final String via); @Override Eventual<LiveHttpResponse> intercept(LiveHttpRequest request, Chain chain);  }