Single-module Maven project (Java 17) demonstrating java.net.http.HttpClient.
Each feature is a small example class in
src/main/java/space/anyi/httpClient/ (QuickStart, GetExample, PostExample,
HeaderExample, BodyExample, FileDownloadExample, SyncAsyncExample,
ResponseHandlerExample, ClientConfigExample, RequestConfigExample,
CoreApiExample). There is no Main.java / exec:java — examples are invoked via tests.
mvn test # run all tests in src/test (JUnit5 + Jackson)
mvn -Dtest=GetExampleTest test # run a single test class
All 12 test classes in src/test/java/space/anyi/httpClient/ hit the live HTTP API and require the API server running on port 8080. Without it, network-dependent tests fail.
API_server/ is a separate, standalone Spring Boot 3.5 app (H2 + JPA + springdoc)
providing the User Management API the HTTP Client examples call. It is not
a Maven module of the root pom (root pom is single-module and independent).
mvn -f API_server/pom.xml spring-boot:run # start API on http://localhost:8080
Endpoint notes: default port 8080; uploads/ (gitignored) stores uploads.
OpenAPI UI available via springdoc once running.
httpClient.md — topic outline (source of truth for structure)doc.md — detailed usage doc; blog.md — finished blog rendering of doc.md,
aligned with the example classesspace.anyi.httpClient (root), space.anyi.* (API server)maven.compiler.source/target = 17)System.nanoTime() to generate unique accounts, avoiding conflicts
with previously-created rows against the shared API server.