EricJoy2048 commented on code in PR #4372:
URL: 
https://github.com/apache/incubator-seatunnel/pull/4372#discussion_r1147246611


##########
seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/config/PagingField.java:
##########
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.http.config;
+
+import org.apache.seatunnel.api.configuration.util.OptionMark;
+
+import lombok.Builder;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Map;
+
+@Data

Review Comment:
   Same as above.



##########
docs/en/connector-v2/source/Http.md:
##########
@@ -34,6 +34,10 @@ Used to read data from Http.
 | retry_backoff_multiplier_ms | int    | No       | 100           |
 | retry_backoff_max_ms        | int    | No       | 10000         |
 | common-options              |        | No       | -             |
+| paging.pageNoField          | String | No       | -             |
+| paging.pageNo               | String | No       | -             |
+| paging.pageSizeField        | String | No       | -             |
+| paging.pageSize             | int    | No       | -             |

Review Comment:
   I think you only need to add one option `pageing` in this table and its type 
if `Object` like `schema` option.



##########
docs/en/connector-v2/source/Http.md:
##########
@@ -289,6 +293,32 @@ Http {
 }
 ```
 
+### page options
+
+## Example
+
+simple:
+
+```hocon
+Http {
+  url = "https://tyrantlucifer.com/api/getDemoData";
+  pageing = {
+    pageNoField = "pageNo",
+    pageNo = "1-2,4,8-10",

Review Comment:
   If I want to get all pageNo datas, how can I config this option?



##########
seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/config/HttpParameter.java:
##########
@@ -25,18 +25,25 @@
 import java.util.Map;
 import java.util.stream.Collectors;
 
+import static 
org.apache.seatunnel.connectors.seatunnel.http.config.HttpConfig.PAGE_NO;
+import static 
org.apache.seatunnel.connectors.seatunnel.http.config.HttpConfig.PAGE_NO_FIELD;
+import static 
org.apache.seatunnel.connectors.seatunnel.http.config.HttpConfig.PAGE_SIZE;
+import static 
org.apache.seatunnel.connectors.seatunnel.http.config.HttpConfig.PAGE_SIZE_FIELD;
+
 @Data

Review Comment:
   Use `@Getter` and `@Setter` is better, because if use this object as a key 
in Map `@Data` may cause some problem.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to