Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Post.java code #42

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Commits on Jul 3, 2024

  1. Update Post.java

    Following Changes made to optimize it:
    
    1)Use CloseableHttpClient and CloseableHttpResponse:
    
    Updated to use the modern HttpClient from Apache HttpComponents.
    Ensured resources are closed properly with try-with-resources.
    
    2) Logging Improvements:
    
    Enhanced logging statements for better clarity.
    
    3)Charset Handling:
    
    Used StandardCharsets.ISO_8859_1 instead of the string literal "ISO-8859-1".
    
    4)Removed Redundant Loop:
    
    The loop running only once is unnecessary, hence removed for clarity.
    sidshehria authored Jul 3, 2024
    Configuration menu
    Copy the full SHA
    2650950 View commit details
    Browse the repository at this point in the history
  2. Update Post.java

    Changes Made to optimize the Code:
    
    1) Use CloseableHttpClient and CloseableHttpResponse:
    
    Updated to use the modern HttpClient from Apache HttpComponents.
    Ensured resources are closed properly with try-with-resources.
    
    2) Logging Improvements:
    
    Enhanced logging statements for better clarity.
    
    3) Charset Handling:
    
    Used StandardCharsets.ISO_8859_1 instead of the string literal "ISO-8859-1".
    
    4) Removed Redundant Loop:
    
    The loop running only once is unnecessary, hence removed for clarity.
    sidshehria authored Jul 3, 2024
    Configuration menu
    Copy the full SHA
    d12d29e View commit details
    Browse the repository at this point in the history