use of org.jboss.resteasy.client.ClientResponse in project quickstarts by jboss-switchyard.
the class MyClientExecutionInterceptor method execute.
public ClientResponse execute(ClientExecutionContext ctx) throws Exception {
ClientRequest request = ctx.getRequest();
ClientResponse response = null;
response = ctx.proceed();
if ((response.getResponseStatus() != null) && (response.getResponseStatus().getStatusCode() == 404)) {
BaseClientResponse r = (BaseClientResponse) response;
MultivaluedMap<String, String> headers = r.getHeaders();
headers.add("full-path", request.getUri());
r.setHeaders(headers);
}
return response;
}
Aggregations