Create an HTTP client in Go that consumes the datetime server APIs implemented in the previous project https://github.com/codescalersinternships/home/issues/144 . This client will focus on building an HTTP client development and testing.
Requirements:
Client Functionality:
[x] Implement functions to call each datetime server endpoint
[x] Handle different response formats (JSON, plain text)
[x] Implement proper error handling and timeouts
Configuration:
[x] Allow configuration of server URLs and ports
[x] Support for environment variable configuration
Develop and Test HTTP Client for Datetime Server https://github.com/codescalersinternships/home/issues/144
Description:
Create an HTTP client in Go that consumes the datetime server APIs implemented in the previous project https://github.com/codescalersinternships/home/issues/144 . This client will focus on building an HTTP client development and testing.
Requirements:
Client Functionality:
Configuration:
[x] Allow configuration of server URLs and ports
[x] Support for environment variable configuration
[x] Retry Mechanism:
[x] Implement a simple retry mechanism with backoff for failed requests: Check https://pkg.go.dev/github.com/cenkalti/backoff/v4 or similar
Testing:
[x] Unit tests for client functions
[x] Integration tests using a mock server
Documentation:
Optional Enhancements:
Acceptance Criteria: