From e8a5193c1939c03818835fca3db47b470abc7331 Mon Sep 17 00:00:00 2001 From: leif stawnyczy Date: Tue, 6 Aug 2024 16:28:23 -0400 Subject: [PATCH] cleaning up --- .../model/CreateHttpRequestParameters.java | 43 ------------------- .../fhir/jaxrs/client/JaxRsHttpClient.java | 10 +++++ 2 files changed, 10 insertions(+), 43 deletions(-) delete mode 100644 hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/model/CreateHttpRequestParameters.java diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/model/CreateHttpRequestParameters.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/model/CreateHttpRequestParameters.java deleted file mode 100644 index 4f31a81323e..00000000000 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/model/CreateHttpRequestParameters.java +++ /dev/null @@ -1,43 +0,0 @@ -package ca.uhn.fhir.rest.client.model; - -import ca.uhn.fhir.rest.api.RequestTypeEnum; -import org.apache.http.HttpEntity; - -@Deprecated -public class CreateHttpRequestParameters { - /** - * GET, DELETE, etc... - * This is the minimum info needed to make a request - */ - private final RequestTypeEnum myRequestTypeEnum; - - private HttpEntity myEntity; - - private String myUrl; - - public CreateHttpRequestParameters(RequestTypeEnum theRequestTypeEnum) { - myRequestTypeEnum = theRequestTypeEnum; - } - - public RequestTypeEnum getRequestTypeEnum() { - return myRequestTypeEnum; - } - - public HttpEntity getEntity() { - return myEntity; - } - - public CreateHttpRequestParameters setEntity(HttpEntity theEntity) { - myEntity = theEntity; - return this; - } - - public String getUrl() { - return myUrl; - } - - public CreateHttpRequestParameters setUrl(String theUrl) { - myUrl = theUrl; - return this; - } -} diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpClient.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpClient.java index bf550678077..840d8122a2e 100644 --- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpClient.java +++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpClient.java @@ -150,6 +150,16 @@ public class JaxRsHttpClient implements IHttpClient { return request; } + @Override + public void addHeadersToRequest(IHttpRequest theRequest, EncodingEnum theEncodingEnum, FhirContext theContext) { + // nothing to do for this client + } + + @Override + public void setNewUrl(StringBuilder theUrl) { + myUrl = theUrl; + } + public void addHeadersToRequest(JaxRsHttpRequest theHttpRequest, EncodingEnum theEncoding, FhirContext theContext) { if (myHeaders != null) { for (Header next : myHeaders) {