Class ApacheWpRestClient
java.lang.Object
io.github.evisentin.wordpress.client.domain.WpBaseRestClient
io.github.evisentin.wordpress.client.adapter.apache.ApacheWpRestClient
- All Implemented Interfaces:
WpRestClient
Apache HttpClient-based implementation of
WpBaseRestClient.
This client provides a synchronous wrapper around the WordPress REST API using
CloseableHttpClient as the underlying HTTP transport.
It supports CRUD operations and paginated queries for core WordPress resources such as posts, categories, and tags.
The client is configured with an authentication strategy and automatically registers internal interceptors for:
- Authentication (
AuthenticationInterceptor) - WordPress-specific error handling (
WpErrorInterceptor)
Optional SslConfiguration and TimeoutConfiguration can be provided
to customize TLS behaviour, connection management, and request timeouts.
Thread Safety
Instances of this class are thread-safe and intended to be reused.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the category API operations.comments()Returns the comment API operations.media()Returns the media API operations.posts()Returns the post API operations.Returns the post status API operations.Returns the post type API operations.tags()Returns the tag API operations.
-
Method Details
-
categories
Description copied from interface:WpRestClientReturns the category API operations.- Returns:
- category API operations
-
comments
Description copied from interface:WpRestClientReturns the comment API operations.- Returns:
- comment API operations
-
media
Description copied from interface:WpRestClientReturns the media API operations.- Returns:
- media API operations
-
postStatuses
Description copied from interface:WpRestClientReturns the post status API operations.- Returns:
- post status API operations
-
postTypes
Description copied from interface:WpRestClientReturns the post type API operations.- Returns:
- post type API operations
-
posts
Description copied from interface:WpRestClientReturns the post API operations.- Returns:
- post API operations
-
tags
Description copied from interface:WpRestClientReturns the tag API operations.- Returns:
- tag API operations
-