You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "wenyongning1 (via GitHub)" <gi...@apache.org> on 2023/04/25 09:04:07 UTC

[GitHub] [incubator-seatunnel] wenyongning1 opened a new issue, #4666: The URL time parameter of HTTP needs improvement

wenyongning1 opened a new issue, #4666:
URL: https://github.com/apache/incubator-seatunnel/issues/4666

   ### Search before asking
   
   - [X] I had searched in the [feature](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22Feature%22) and found no similar feature requirement.
   
   
   ### Description
   
   I hope seatunel will automatically convert the time parameter in the URL of hhtp from 2023-04-18 16:25:00 format to startTime=2023-04-18%2016:25:00 format
   
   ### Usage Scenario
   
   
     url = "http://mockserver:1080/jsonpath/mock?startTime=2023-04-18 2016:25:00&endTime=2023-04-18 2016:30:00"
   Seatune generated code automatically converted to
     url = "http://mockserver:1080/jsonpath/mock?startTime=2023-04-18%202016:25:00&endTime=2023-04-18%202016:30:00"
   
   ### Related issues
   
   Because it is necessary to dynamically transmit time parameters to obtain HTTP data, but the incoming time parameters do not comply with HTTP specifications, so seatunel needs to automatically convert them.
   
   ### Are you willing to submit a PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] kim-up commented on issue #4666: The URL time parameter of HTTP needs improvement

Posted by "kim-up (via GitHub)" <gi...@apache.org>.
kim-up commented on issue #4666:
URL: https://github.com/apache/incubator-seatunnel/issues/4666#issuecomment-1521681167

   @wenyongning1 You can avoid this problem by putting the time parameter in `params` instead of splicing it after the Url. Because, in this way, the parameters can be encodedUrlForm automatically when calling `Http` . As follows:
   ```
   source {
       Http {
       url = "http://mockserver:1080/jsonpath/mock",
       method = "GET",
       params {
            startTime = "2023-04-18 2016:25:00",
            endTime = "2023-04-18 2016:30:00"
        }
   }
   ```
   Eventually the entire Url will be converted to: http://mockserver:1080/jsonpath/mock?startTime=2023-04-18+2016%3A25%3A00&endTime=2023-04-18+2016%3A30%3A00
   
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] wenyongning1 commented on issue #4666: The URL time parameter of HTTP needs improvement

Posted by "wenyongning1 (via GitHub)" <gi...@apache.org>.
wenyongning1 commented on issue #4666:
URL: https://github.com/apache/incubator-seatunnel/issues/4666#issuecomment-1521536584

   > Maybe , the `url` needs to UrlEncode ?
   Yes, currently the URL of the ST configuration file is written at 2023-04-18 16:25:00 which is an error message, must be written at 2023-04-18%2016:30:00
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] wenyongning1 commented on issue #4666: The URL time parameter of HTTP needs improvement

Posted by "wenyongning1 (via GitHub)" <gi...@apache.org>.
wenyongning1 commented on issue #4666:
URL: https://github.com/apache/incubator-seatunnel/issues/4666#issuecomment-1522727943

   > @wenyongning1 You can avoid this problem by putting the time parameter in `params` instead of splicing it after the Url. Because, in this way, the parameters can be encodedUrlForm automatically when calling `Http` . As follows:
   > 
   > ```
   > source {
   >     Http {
   >     url = "http://mockserver:1080/jsonpath/mock",
   >     method = "GET",
   >     params {
   >          startTime = "2023-04-18 2016:25:00",
   >          endTime = "2023-04-18 2016:30:00"
   >      }
   > }
   > ```
   > 
   > Eventually the entire Url will be converted to: http://mockserver:1080/jsonpath/mock?startTime=2023-04-18+2016%3A25%3A00&endTime=2023-04-18+2016%3A30%3A00
   
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] wenyongning1 closed issue #4666: The URL time parameter of HTTP needs improvement

Posted by "wenyongning1 (via GitHub)" <gi...@apache.org>.
wenyongning1 closed issue #4666: The URL time parameter of HTTP needs improvement
URL: https://github.com/apache/incubator-seatunnel/issues/4666


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] kim-up commented on issue #4666: The URL time parameter of HTTP needs improvement

Posted by "kim-up (via GitHub)" <gi...@apache.org>.
kim-up commented on issue #4666:
URL: https://github.com/apache/incubator-seatunnel/issues/4666#issuecomment-1521469785

   Maybe , the  `url` needs  to UrlEncode ? 


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] wenyongning1 commented on issue #4666: The URL time parameter of HTTP needs improvement

Posted by "wenyongning1 (via GitHub)" <gi...@apache.org>.
wenyongning1 commented on issue #4666:
URL: https://github.com/apache/incubator-seatunnel/issues/4666#issuecomment-1522729372

   
   > ```
   > 
   >
   
   
   
   > @wenyongning1 You can avoid this problem by putting the time parameter in `params` instead of splicing it after the Url. Because, in this way, the parameters can be encodedUrlForm automatically when calling `Http` . As follows:
   > 
   > ```
   > source {
   >     Http {
   >     url = "http://mockserver:1080/jsonpath/mock",
   >     method = "GET",
   >     params {
   >          startTime = "2023-04-18 2016:25:00",
   >          endTime = "2023-04-18 2016:30:00"
   >      }
   > }
   > ```
   > 
   > Eventually the entire Url will be converted to: http://mockserver:1080/jsonpath/mock?startTime=2023-04-18+2016%3A25%3A00&endTime=2023-04-18+2016%3A30%3A00
   okļ¼ŒThank you.
   
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] kim-up commented on issue #4666: The URL time parameter of HTTP needs improvement

Posted by "kim-up (via GitHub)" <gi...@apache.org>.
kim-up commented on issue #4666:
URL: https://github.com/apache/incubator-seatunnel/issues/4666#issuecomment-1521521593

   @wenyongning1 Can you offer the http connector config ?


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] wenyongning1 commented on issue #4666: The URL time parameter of HTTP needs improvement

Posted by "wenyongning1 (via GitHub)" <gi...@apache.org>.
wenyongning1 commented on issue #4666:
URL: https://github.com/apache/incubator-seatunnel/issues/4666#issuecomment-1521536846

   > @wenyongning1 Can you offer the http connector config ?
   source {
     Http {
       url = "http://mockserver:1080/jsonpath/mock?startTime=2023-04-18%2016:25:00&endTime=2023-04-18%2016:30:00"
   	method = "GET"
     }
   }
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org