-
Notifications
You must be signed in to change notification settings - Fork 0
Description
@pawaitemadisoncollege week 8 is complete
Scope per rubric / plan
- Consume a RESTful web service in your individual project.
- Create a pojo that represents the response from the service.
- Create a client that calls the service and maps the response to the pojo. The client should be created in it's own DAO class.
- Write a unit test to verify the client Dao and pojo work.
Evidence (links, screenshots)
/docs/screenshots/Week8-RestfulAPI_Tests_Passing-QuoteServiceTest.png:
Reflection
Key Learning Points / Takeaways
This week, I deepened my understanding of how to consume and deserialize external REST APIs in Java using HttpClient and Jackson. I learned how JSON structure dictates the POJO mapping (e.g., array vs. object roots) and how to generate and adapt POJOs using RoboPOJOGenerator. I also learned how to design a resilient service layer—adding caching, configuration-based properties, and fallback behavior for failed API calls. Another big takeaway was how to dynamically build URIs with optional parameters (author and tag filters) while keeping the logic clean and flexible for future user-controlled settings.
What Challenged Me
The biggest challenge was troubleshooting SSL/TLS handshake errors when switching from HTTP to HTTPS. This turned out not to be a coding issue but rather a local certificate validation problem caused by an expired or intercepted certificate chain on my machine. Debugging that taught me more about how Java and Windows handle HTTPS validation, truststores, and certificates—definitely outside the usual scope of web app development but valuable knowledge nonetheless.
Problems Solved and Resources Used
I solved several practical problems:
Replaced hard-coded values with configuration properties in application.properties to make the service more maintainable and compliant to class standards.
Implemented a simple caching mechanism and structured log output to improve performance and traceability. I had issues with maxing out calls to the API. I started using Zen quotes and swapped it out for "Quotables API", because they were trying to force me to pay for it.
Identified the root cause of the HTTPS error and implemented a temporary safe fallback to HTTP with a configuration flag and a TODO marker for future TLS remediation.
Resources used:
included the Quotable API documentation, Jackson and HttpClient reference material, IntelliJ’s built-in HTTP client for testing endpoints, and several community discussions/documentation pages on Java’s SSL certificate validation.
Approval checklist
- All checkpoint requirements checked above
- Evidence attached
- Links added (docs, PRs, CI run)
- Ready for review
Metadata
Metadata
Assignees
Labels
Projects
Status
Status