okhttp3-cookie-helper

description

License

License

GroupId

GroupId

org.riversun
ArtifactId

ArtifactId

okhttp3-cookie-helper
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

okhttp3-cookie-helper
description
Project URL

Project URL

https://github.com/riversun/okhttp3-cookie-helper
Source Code Management

Source Code Management

https://github.com/riversun/okhttp3-cookie-helper

Download okhttp3-cookie-helper

How to add to project

<!-- https://jarcasting.com/artifacts/org.riversun/okhttp3-cookie-helper/ -->
<dependency>
    <groupId>org.riversun</groupId>
    <artifactId>okhttp3-cookie-helper</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.riversun/okhttp3-cookie-helper/
implementation 'org.riversun:okhttp3-cookie-helper:1.0.1'
// https://jarcasting.com/artifacts/org.riversun/okhttp3-cookie-helper/
implementation ("org.riversun:okhttp3-cookie-helper:1.0.1")
'org.riversun:okhttp3-cookie-helper:jar:1.0.1'
<dependency org="org.riversun" name="okhttp3-cookie-helper" rev="1.0.1">
  <artifact name="okhttp3-cookie-helper" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.riversun', module='okhttp3-cookie-helper', version='1.0.1')
)
libraryDependencies += "org.riversun" % "okhttp3-cookie-helper" % "1.0.1"
[org.riversun/okhttp3-cookie-helper "1.0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
com.squareup.okhttp3 : okhttp jar 3.6.0

test (1)

Group / Artifact Type Version
junit : junit jar 4.7

Project Modules

There are no modules declared in this project.

Overview

Lib for Enabling Cookie Handling for OkHttp3. You can 'Set Cookie' from client.

It is licensed under MIT.

Maven Central

  • A library for letting okhttp3 handle cookies. It can be used easily.
  • Keep cookies on memory, to do persistence yourself if you need.
  • Run on Android and Pure Java environment.

Example

String url = "https://example.com/webapi";

OkHttp3CookieHelper cookieHelper = new OkHttp3CookieHelper();
    
//force set cookie from the client
cookieHelper.setCookie(url, "cookie_name", "cookie_value");

//set OkHttp3CookieHelper as cookieJar
OkHttpClient client = new OkHttpClient.Builder()
.cookieJar(cookieHelper.cookieJar())
.build();

Request request = new Request.Builder()
.url(url)
.build();

Gradle

compile 'org.riversun:okhttp3-cookie-helper:1.0.0'

Maven

<dependency>
<groupId>org.riversun</groupId>
<artifactId>okhttp3-cookie-helper</artifactId>
<version>1.0.0</version>
</dependency>

Versions

Version
1.0.1
1.0.0