Skip to content
Cool User agent interceptor for Okhttp3
Branch: master
Clone or download
Latest commit c301589 Jun 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea/codeStyles
app Initial commit Jun 14, 2019
cooper
gradle/wrapper Initial commit Jun 14, 2019
.gitignore
README.md Update README.md Jun 18, 2019
build.gradle Added jitpack plugin Jun 14, 2019
gradlew Initial commit Jun 14, 2019
gradlew.bat Initial commit Jun 14, 2019
settings.gradle Renamed to Cooper, Agent Cooper Jun 18, 2019

README.md

Cooper, interceptor for OkHttp3 to add bran new shine User-Agent header

This interceptor adds a useful User Agent header value.

Following this format:

User-Agent:Your awesome app name / 1.0.1(2830803); StandAloneInstall; (Google; Android SDK built for x86_64; SDK 28; Android 9)

AppName / VersionName(VersionCode); Installer package; (manufacturer; model; SDK version; Android version code)

Usage

val client = OkHttpClient.Builder()
client.addInterceptor(CooperInterceptor(context))

Install

Last release:

Add it in your root build.gradle at the end of repositories:

allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Add the dependency

dependencies {
	        implementation 'com.github.danielceinos:Cooper:X.Y.Z'
}
You can’t perform that action at this time.