Class ApacheWpRestClient
java.lang.Object
io.github.evisentin.wordpress.rest.client.domain.WpBaseRestClient
io.github.evisentin.wordpress.rest.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.Returns the page revisions API operations.pages()Returns the page API operations.Returns the post revisions API operations.posts()Returns the post API operations.Returns the post status API operations.Returns the post type API operations.search()Returns the search API operations.tags()Returns the tag API operations.Returns the taxonomy 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
-
pageRevisions
Description copied from interface:WpRestClientReturns the page revisions API operations.- Returns:
- page revision API operations
-
pages
Description copied from interface:WpRestClientReturns the page API operations.- Returns:
- page API operations
-
postRevisions
Description copied from interface:WpRestClientReturns the post revisions API operations.- Returns:
- post revision 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
-
search
Description copied from interface:WpRestClientReturns the search API operations.- Returns:
- search API operations
-
tags
Description copied from interface:WpRestClientReturns the tag API operations.- Returns:
- tag API operations
-
taxonomies
Description copied from interface:WpRestClientReturns the taxonomy API operations.- Returns:
- taxonomy API operations
-