All notable changes to the core:httpclient module will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.7 - 2026-01-29
- Minor updates and improvements
- Updated dependencies to latest versions
- Upgraded to Java 11
1.0.6 - Earlier Release
- Bug fixes and enhancements
1.0.0 - Initial Release
- Full HTTP Method Support
- GET - Retrieve resources
- POST - Create resources with payload
- PUT - Update resources
- DELETE - Remove resources
- PATCH - Partial resource updates
- Fluent API - Clean, builder-based request construction
- Apache HttpComponents - Built on industry-standard HTTP library (4.5.14)
HttpRequest.HttpRequestBuilder- Fluent builder for HTTP requestswithHost()- Set host URLwithPort()- Set custom portwithEndPoint()- Define endpoint pathwithHeader()- Add single headerwithHeaders()- Add multiple headers at oncewithQueryParameter()- Add query parameters (single or multiple)withBasicAuth()- Configure Basic AuthenticationwithHttpPayload()- Set request payloadwithRetryPolicy()- Configure retry behaviorbuild()- Create immutable HttpRequest
- Support for multiple payload types:
- JSON (application/json)
- Form data (application/x-www-form-urlencoded)
- Multipart form data (multipart/form-data) with file uploads
- Plain text (text/plain)
- XML (application/xml)
- Custom content types
HttpResponse- Comprehensive response objectgetStatusCode()- Get HTTP status codegetHeaders()- Access response headers as MapgetBody()- Get raw response body as StringgetJSONObjectBody()- Parse response as JSONObjectgetJSONArrayBody()- Parse response as JSONArray
HttpResponseHandler<R>- Interface for custom response processingonResponse()- Process successful responses with type-safe returnonMaxRetryAttempted()- Handle scenarios when all retries exhausted- Generic return type support for flexible response parsing
RetryPolicy- Configurable retry behavior- Customizable retry conditions
- Pluggable backoff strategies
- Configurable maximum retry attempts
DefaultRetryPolicy- Pre-configured retry policyget(int maxRetries)- Quick retry policy creation- Sensible defaults for common scenarios
RetryCondition- Interface for custom retry conditions- Determine when to retry based on response
DefaultRetryCondition- Built-in retry logic- Retries on server errors (5xx)
- Retries on timeout errors
- Retries on connection failures
BackoffStrategy- Interface for delay calculation- Control wait time between retry attempts
DefaultBackoffStrategy- Built-in backoff implementation- Progressive delay between retries
- Prevents overwhelming servers
- Basic Authentication
- Username/password authentication
- Automatic header encoding
- OAuth 1.0 Support
OAuthConfig- OAuth configuration builderconsumerKey()- OAuth consumer keyconsumerSecret()- OAuth consumer secretaccessToken()- OAuth access tokenaccessTokenSecret()- OAuth access token secret
OAuth10HttpRequestHandler- Automatic OAuth signature generation- Integration with ScribeJava 8.3.3
- Automatic request signing
HttpRequestHandler- Pre-request processing hookonRequest()- Modify request before execution- Add custom headers dynamically
- Implement cross-cutting concerns (logging, metrics, etc.)
- Multiple handlers support with chaining
- Extensible handler system
- Add authentication headers
- Inject correlation IDs
- Add timestamps
- Implement custom logic before requests
HttpExecutionContext- Request execution context and metadatasetMetaData()- Attach metadata map to requestaddMetaData()- Add individual metadata entriesaddHttpRequestHandler()- Register request handlerssetHttpRequestHandlers()- Register multiple handlers at once- Pass contextual information through request lifecycle
- Support for correlation IDs and request tracking
- Handler chain execution
HttpClient- Main HTTP client implementationexecute()- Execute HTTP request with context and handler- Automatic retry handling
- Request/response handler execution
- Exception handling and propagation
HttpMethod- HTTP method enumeration- GET, POST, PUT, DELETE, PATCH constants
HttpRequestResponse- Wrapper for request/response pair- Used in retry logic and handlers
- Access to both request and response
ApacheHttpRequestBuilder- Internal Apache HttpClient builder- Converts HttpRequest to Apache HttpClient format
- Handles different payload types
- Manages headers and authentication
HttpException- Custom exception for HTTP errors- Comprehensive error messages
- Wraps underlying exceptions
- Thrown for client and server errors
- Retry mechanism for transient failures
- Max retry callback for permanent failures
- Status code-based error handling
- Structured Logging via SLF4J 2.0.16
- Logstash Integration with Logstash Logback Encoder 8.0
- JSON-formatted logs
- Structured request/response logging
- Automatic logging of:
- Request name and HTTP method
- Full URL with query parameters
- Request headers (sanitized)
- Response status code
- Response time/latency
- Retry attempts
- Metadata from execution context
- Error details and stack traces
StringPool- String constants and utilities- Common charset definitions (UTF8)
- String pooling for memory efficiency
- File upload support via multipart/form-data
- Mixed content in single request (files + form fields)
- Automatic MIME type detection
- Large file handling via Apache HttpMime 4.5.14
- Apache HttpComponents Client 4.5.14 - HTTP client implementation
- Apache HttpMime 4.5.14 - Multipart form data support
- SLF4J API 2.0.16 - Logging abstraction
- org.json 20250107 - JSON parsing and manipulation
- Logstash Logback Encoder 8.0 - Structured logging
- ScribeJava Core 8.3.3 - OAuth 1.0 support
- Logback Classic 1.5.16 (test) - Logging implementation for tests
- JUnit Jupiter 5.8.1 (test) - Unit testing framework
- core:util - JLite utility classes
- Single parameter addition
- Bulk parameter addition via Map
- Automatic URL encoding
- Type-safe parameter handling
- Single header addition
- Bulk header addition via Map
- Header overriding support
- Case-insensitive header access in responses
- JSON Payloads - Automatic JSON serialization
- Form Data - URL-encoded form submissions
- Multipart Forms - File uploads with mixed content
- Plain Text - Simple text payloads
- XML - XML document submissions
- Custom - Support for any content type
- Custom retry conditions based on:
- HTTP status codes
- Response headers
- Response body content
- Exception types
- Custom backoff strategies:
- Fixed delay
- Linear backoff
- Exponential backoff
- Custom algorithms
- Retry context passed to strategies
- Access to previous attempts in handlers
- Type-safe response handling with generics
- Automatic JSON parsing
- Raw response access
- Header access
- Status code checking
- Custom parsing logic
- Java 11 or higher
- Comprehensive README with 770+ lines
- Quick start guides
- Full API reference
- Multiple usage examples:
- All HTTP methods (GET, POST, PUT, DELETE, PATCH)
- Authentication (Basic Auth, OAuth 1.0)
- Headers and query parameters
- Retry policies and strategies
- Custom request/response handlers
- Execution context usage
- Response processing
- Error handling patterns
- Multiple payload types
- Advanced usage patterns:
- Complete examples with all features
- Different content type handling
- Custom retry implementations
- Handler chaining
- Context metadata usage
- Best practices and patterns
- Logging configuration examples