https://github.com/alexanderwolz/http-client
Sophisticated http client wrapper
https://github.com/alexanderwolz/http-client
authentication certificates client http mtls mtls-authentication okhttp wrapper
Last synced: 6 months ago
JSON representation
Sophisticated http client wrapper
- Host: GitHub
- URL: https://github.com/alexanderwolz/http-client
- Owner: alexanderwolz
- License: apache-2.0
- Created: 2025-09-29T15:25:52.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-10-07T05:30:04.000Z (6 months ago)
- Last Synced: 2025-10-07T07:20:32.882Z (6 months ago)
- Topics: authentication, certificates, client, http, mtls, mtls-authentication, okhttp, wrapper
- Language: Kotlin
- Homepage: https://www.alexanderwolz.de
- Size: 262 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HTTP Client





## 🧑💻 About
This repository provide a sophisticated http client wrapper.
## 🛠️ Build
1. Create jar resource using ```./gradlew clean build```
2. Copy ```/build/libs/*.jar``` into your project
3. Use the http client classes
## 📦 Getting the latest release
You can pull the latest binaries from the central Maven repositories:
with Gradle
```kotlin
implementation("de.alexanderwolz:http-client:1.4.4")
```
with Maven
```xml
de.alexanderwolz
http-client
1.4.4
```
## 🪄 Example
```kotlin
val formPayload = Payload.create(
BasicContentTypes.FORM_URL_ENCODED,
Form(
"grant_type" to "client_credentials",
"client_id" to "XYZ12345",
"client_secret" to "9876543ABC",
"scope" to "oidc"
)
)
val client = HttpClient.Builder()
.method(HttpMethod.POST)
.endpoint("https://sso.example.com/token")
.accept(BasicContentTypes.OAUTH_TOKEN)
.body(formPayload)
.build()
val response = client.execute()
if (response.isOK && response.body.type == BasicContentTypes.OAUTH_TOKEN) {
val accessToken = response.body.element as OAuthTokenResponse
} else{
throw Exception("Received error ${response.code}")
}
```
- - -
Made with ❤️ in Bavaria
© 2025, Alexander Wolz