Installation¶
Artifacts are available on Maven Central.
WP REST Client is organized into a modular architecture:
- Domain API: public interfaces, models, DTOs, and abstractions.
- HTTP client implementations: concrete clients based on Apache HttpClient or OkHttp.
Most applications should depend on exactly one implementation module: either wp-rest-client-apache or
wp-rest-client-okhttp.
Requirements¶
- Java 21 or Java 25
- Maven or another JVM build tool
- A WordPress site exposing the WordPress REST API
Maven Dependencies¶
Apache HttpClient Implementation¶
Use this dependency if your application already uses Apache HttpClient, or if you want to use the Apache-based implementation.
OkHttp Implementation¶
Use this dependency if your application already uses OkHttp, or if you prefer the OkHttp-based implementation.
Domain API¶
Use this module only if you want to depend on the public API, DTOs, and abstractions without selecting a concrete HTTP implementation.
Which Module Should I Use?¶
| Scenario | Dependency |
|---|---|
| I want to use Apache HttpClient | wp-rest-client-apache |
| I want to use OkHttp | wp-rest-client-okhttp |
Next Step¶
After adding a dependency, continue with Quick Start to create your first client and execute requests against the WordPress REST API.