leosanqing opened a new pull request, #4204:
URL: https://github.com/apache/incubator-inlong/pull/4204

   ### Title Name: [INLONG-4203][component] Title of the pull request
   
   
   Fixes #<4023>
   
   ### Motivation
   - The stream of the http request is not closed, which may cause a leak
   - When creating an okhttp request, there is redundant code. After the get() 
param, post() is used, and it can also be simplified.
   - When parsing the response, the processing is a bit cumbersome, and the 
generic type is not used
   
   
   
   ### Modifications
   
   - Use try-with-resources to prevent unclosed streams
   - Provide a new Json parsing method to easily parse the response of Http 
requests
   - Correct some wrong usage of creating OkHttp Request object
   
   ### Verifying this change
   
   *(Please pick either of the following options)*
   
   - [  ] This change is a trivial rework/code cleanup without any test 
coverage.
   
   
   
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (no)
   


-- 
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