diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml
index 9a9c9db0712..4a49d458c1b 100644
--- a/hapi-deployable-pom/pom.xml
+++ b/hapi-deployable-pom/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.7.9-SNAPSHOT
+ 6.7.10-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml
index 6c651589597..7f35ad22728 100644
--- a/hapi-fhir-android/pom.xml
+++ b/hapi-fhir-android/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.7.9-SNAPSHOT
+ 6.7.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml
index 1589c864f56..4fe0c871f41 100644
--- a/hapi-fhir-base/pom.xml
+++ b/hapi-fhir-base/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.7.9-SNAPSHOT
+ 6.7.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/PagingHttpMethodEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/PagingHttpMethodEnum.java
new file mode 100644
index 00000000000..318de5cdcb7
--- /dev/null
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/PagingHttpMethodEnum.java
@@ -0,0 +1,47 @@
+/*
+ * #%L
+ * HAPI FHIR - Core Library
+ * %%
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+package ca.uhn.fhir.rest.api;
+
+/**
+ * Enumerated type to represent allowable HTTP methods for a paging request.
+ */
+public enum PagingHttpMethodEnum {
+
+ /**
+ * This is the most common default behaviour. Performs the paging using GET HTTP method.
+ */
+ GET(RequestTypeEnum.GET),
+
+ /**
+ * Performs the paging using POST HTTP method. Note that this style is less commonly supported
+ * in servers, so it should not be used unless there is a specific reason for needing to.
+ */
+ POST(RequestTypeEnum.POST);
+
+ private final RequestTypeEnum myRequestType;
+
+ PagingHttpMethodEnum(RequestTypeEnum theRequestType) {
+ this.myRequestType = theRequestType;
+ }
+
+ public RequestTypeEnum getRequestType() {
+ return myRequestType;
+ }
+}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IGetPageTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IGetPageTyped.java
index c76ab57373e..c5bf36111ad 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IGetPageTyped.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IGetPageTyped.java
@@ -20,8 +20,10 @@
package ca.uhn.fhir.rest.gclient;
+import ca.uhn.fhir.rest.api.PagingHttpMethodEnum;
+
public interface IGetPageTyped extends IClientExecutable, T> {
-
- // nothing for now
+
+ IGetPageTyped usingMethod(PagingHttpMethodEnum thePagingHttpMethod);
}
diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml
index 8a1156fd1bf..bb11b3b1b72 100644
--- a/hapi-fhir-bom/pom.xml
+++ b/hapi-fhir-bom/pom.xml
@@ -4,7 +4,7 @@
4.0.0
ca.uhn.hapi.fhir
hapi-fhir-bom
- 6.7.9-SNAPSHOT
+ 6.7.10-SNAPSHOT
pom
HAPI FHIR BOM
@@ -12,7 +12,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.7.9-SNAPSHOT
+ 6.7.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-checkstyle/pom.xml b/hapi-fhir-checkstyle/pom.xml
index fedf79120fb..58414fba4a3 100644
--- a/hapi-fhir-checkstyle/pom.xml
+++ b/hapi-fhir-checkstyle/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.7.9-SNAPSHOT
+ 6.7.10-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
index a86bc265676..98fbf8c4e19 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.7.9-SNAPSHOT
+ 6.7.10-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
index 34a14973ee2..1999f2de722 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir-cli
- 6.7.9-SNAPSHOT
+ 6.7.10-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml
index 6aadaeafdcd..5f5c3be5933 100644
--- a/hapi-fhir-cli/pom.xml
+++ b/hapi-fhir-cli/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.7.9-SNAPSHOT
+ 6.7.10-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml
index eb21412866f..9a18f892ecb 100644
--- a/hapi-fhir-client-okhttp/pom.xml
+++ b/hapi-fhir-client-okhttp/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.7.9-SNAPSHOT
+ 6.7.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml
index 477e8299793..55336e9422f 100644
--- a/hapi-fhir-client/pom.xml
+++ b/hapi-fhir-client/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.7.9-SNAPSHOT
+ 6.7.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/GenericClient.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/GenericClient.java
index afa9ed1e697..f21c1be4c71 100644
--- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/GenericClient.java
+++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/GenericClient.java
@@ -42,6 +42,7 @@ import ca.uhn.fhir.rest.api.DeleteCascadeModeEnum;
import ca.uhn.fhir.rest.api.EncodingEnum;
import ca.uhn.fhir.rest.api.IVersionSpecificBundleFactory;
import ca.uhn.fhir.rest.api.MethodOutcome;
+import ca.uhn.fhir.rest.api.PagingHttpMethodEnum;
import ca.uhn.fhir.rest.api.PatchTypeEnum;
import ca.uhn.fhir.rest.api.PreferReturnEnum;
import ca.uhn.fhir.rest.api.SearchStyleEnum;
@@ -59,7 +60,7 @@ import ca.uhn.fhir.rest.client.method.DeleteMethodBinding;
import ca.uhn.fhir.rest.client.method.HistoryMethodBinding;
import ca.uhn.fhir.rest.client.method.HttpDeleteClientInvocation;
import ca.uhn.fhir.rest.client.method.HttpGetClientInvocation;
-import ca.uhn.fhir.rest.client.method.HttpSimpleGetClientInvocation;
+import ca.uhn.fhir.rest.client.method.HttpSimpleClientInvocation;
import ca.uhn.fhir.rest.client.method.IClientResponseHandler;
import ca.uhn.fhir.rest.client.method.MethodUtil;
import ca.uhn.fhir.rest.client.method.OperationMethodBinding;
@@ -848,6 +849,8 @@ public class GenericClient extends BaseClient implements IGenericClient {
private Class extends IBaseBundle> myBundleType;
private String myUrl;
+ private PagingHttpMethodEnum myPagingHttpMethod = PagingHttpMethodEnum.GET;
+
public GetPageInternal(String theUrl, Class extends IBaseBundle> theBundleType) {
myUrl = theUrl;
myBundleType = theBundleType;
@@ -855,13 +858,15 @@ public class GenericClient extends BaseClient implements IGenericClient {
@Override
public Object execute() {
- IClientResponseHandler binding;
- binding = new ResourceResponseHandler(myBundleType, getPreferResponseTypes());
- HttpSimpleGetClientInvocation invocation = new HttpSimpleGetClientInvocation(myContext, myUrl);
- invocation.setUrlSource(UrlSourceEnum.EXPLICIT);
+ IClientResponseHandler binding = new ResourceResponseHandler(myBundleType, getPreferResponseTypes());
+ HttpSimpleClientInvocation invocationGet = new HttpSimpleClientInvocation(myContext, myUrl, myPagingHttpMethod);
+ return invoke(null, binding, invocationGet);
+ }
- Map> params = null;
- return invoke(params, binding, invocation);
+ @Override
+ public IGetPageTyped