diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java index 64b7267f63f..388f65b4c33 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java @@ -105,8 +105,7 @@ public enum Pointcut implements IPointcut { void.class, "ca.uhn.fhir.rest.client.api.IHttpRequest", "ca.uhn.fhir.rest.client.api.IHttpResponse", - "ca.uhn.fhir.rest.client.api.IRestfulClient", - "ca.uhn.fhir.rest.client.api.ClientResponseContext"), + "ca.uhn.fhir.rest.client.api.IRestfulClient"), /** * Server Hook: diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseClient.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseClient.java index 5aa920c920e..8acd05255c2 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseClient.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseClient.java @@ -36,7 +36,6 @@ import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.api.EncodingEnum; import ca.uhn.fhir.rest.api.RequestFormatParamStyleEnum; import ca.uhn.fhir.rest.api.SummaryEnum; -import ca.uhn.fhir.rest.client.api.ClientResponseContext; import ca.uhn.fhir.rest.client.api.IHttpClient; import ca.uhn.fhir.rest.client.api.IHttpRequest; import ca.uhn.fhir.rest.client.api.IHttpResponse; @@ -357,20 +356,13 @@ public abstract class BaseClient implements IRestfulClient { ? ((ResourceResponseHandler) binding).getReturnType() : null; - final ClientResponseContext clientResponseContext = - new ClientResponseContext(httpRequest, response, this, getFhirContext(), returnType); HookParams responseParams = new HookParams(); responseParams.add(IHttpRequest.class, httpRequest); responseParams.add(IHttpResponse.class, response); responseParams.add(IRestfulClient.class, this); - responseParams.add(ClientResponseContext.class, clientResponseContext); getInterceptorService().callHooks(Pointcut.CLIENT_RESPONSE, responseParams); - // Replace the contents of the response with whatever the hook returned, or the same response as before if - // it no-op'd - response = clientResponseContext.getHttpResponse(); - String mimeType; if (Constants.STATUS_HTTP_204_NO_CONTENT == response.getStatus()) { mimeType = null; diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_0_0/5502-base-client-client-response-pointcut-mutate-response.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_0_0/5502-base-client-client-response-pointcut-mutate-response.yaml deleted file mode 100644 index 31114533369..00000000000 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_0_0/5502-base-client-client-response-pointcut-mutate-response.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -type: add -issue: 5502 -jira: SMILE-7262 -title: "It is now possible to mutate an HTTP response from the CLIENT_RESPONSE Pointcut, and pass this mutated response - to downstream processing."