Sunday KOTLIN outfoxx/sunday-kt
A Sunday client library implementation written in Kotlin and supporting the JVM and Android.
Tip
While you can use Sunday (Kotlin) to write REST clients manually, Sunday is most useful when generating clietns from API definitions using the Sunday Generator.
Implementations
Sunday Kotlin is modularized to allow for multiple implementations. Currently the following implementations are available:
- JDK HTTP Client
- Uses the native JDK 11 HTTP Client to execute HTTP requests.
- Square OkHttp
- Uses Square's OkHttp library (version 4) to execute HTTP requests. OkHttp supports easy configuration of advanced features like certificate pinning and configuration interceptors.
Installation
Sunday is delivered as a standard Maven library from Maven Central.
dependencies {
// If using JDK implementation
implementation("io.outfoxx.sunday:sunday-jdk:1.0.0-beta.18")
// If using OkHttp implementation
implementation("io.outfoxx.sunday:sunday-okhttp:1.0.0-beta.18")
}
dependencies {
// If using JDK implementation
implementation 'io.outfoxx.sunday:sunday-jdk:1.0.0-beta.18'
// If using OkHttp implementation
implementation 'io.outfoxx.sunday:sunday-okhttp:1.0.0-beta.18'
}
<dependencies>
<dependency>
<groupId>io.outfoxx.sunday</groupId>
<!-- If using JDK implementation -->
<artifactId>sunday-jdk</artifactId>
<!-- If using OkHttp implementation -->
<artifactId>sunday-okhttp</artifactId>
<version>1.0.0-beta.18</version>
</dependency>
</dependencies>
Usage
License
Copyright 2015 Outfox, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.