Example usage for com.squareup.okhttp Interceptor interface-usage

List of usage examples for com.squareup.okhttp Interceptor interface-usage

Introduction

In this page you can find the example usage for com.squareup.okhttp Interceptor interface-usage.

Usage

From source file io.macgyver.core.okhttp.LoggingInterceptor.java

/**
 * This is a modified version of Square's HttpLoggingInterceptor.
 * 
 * It is bound to SLF4J. All logging will performed at debug level. If the
 * logger is not set to debug level, the interceptor will be a no-op. If there
 * is an exception thrown during the logging operation, the exception is caught

From source file io.minio.RequestSigner.java

class RequestSigner implements Interceptor {
    private static final DateTimeFormatter dateFormatyyyyMMddThhmmssZ = DateTimeFormat
            .forPattern("yyyyMMdd'T'HHmmss'Z'").withZoneUTC();
    private static final DateTimeFormatter dateFormatyyyyMMdd = DateTimeFormat.forPattern("yyyyMMdd").withZoneUTC();
    private static final DateTimeFormatter dateFormat = DateTimeFormat.forPattern("EEE, dd MMM yyyy HH:mm:ss zzz")
            .withZoneUTC();

From source file it.smartcommunitylab.GzipRequestInterceptor.java

/**
 * Encodes request bodies using gzip.
 *
 * Taken from https://github.com/square/okhttp/issues/350
 */
class GzipRequestInterceptor implements Interceptor {

From source file me.pkliang.gankmaku.data.net.HttpLoggingInterceptor.java

/**
 * An OkHttp interceptor which logs request and response information. Can be applied as an
 * {@linkplain OkHttpClient#interceptors() application interceptor} or as a
 * {@linkplain OkHttpClient#networkInterceptors() network interceptor}.
 * <p>
 * The format of the logs created by this class should not be considered stable and may change

From source file me.touko.okhttp2.RetryRequestInterceptor.java

/**
 * a interceptor for okHttp, can retry request until {@link RetryConfig#isSuccess(Request, Response)} return true
 *
 * author: zhou date: 2016/4/11.
 */
public class RetryRequestInterceptor implements Interceptor {

From source file name.kevinlocke.appveyor.testutils.ConcurrentHttpLoggingInterceptor.java

/**
 * An OkHttp interceptor which logs request and response information. Can be
 * applied as an {@linkplain OkHttpClient#interceptors() application
 * interceptor} or as a {@linkplain OkHttpClient#networkInterceptors() network
 * interceptor}.
 * <p>

From source file net.goldenspiral.fetlifeoss.rest.interceptors.HeaderInterceptor.java

/**
 * Created by malachi on 10/8/15.
 */
public class HeaderInterceptor implements Interceptor {
    private String key, value;

From source file net.goldenspiral.fetlifeoss.rest.interceptors.LoggingInterceptor.java

/**
 * Created by malachi on 10/8/15.
 * from https://github.com/square/okhttp/wiki/Interceptors
 */
public class LoggingInterceptor implements Interceptor {
    private static final String TAG = LoggingInterceptor.class.getSimpleName();

From source file net.simonvt.cathode.api.RetryingInterceptor.java

public class RetryingInterceptor implements Interceptor {

    private final int maxRetryCount;

    private final long retryDelay;

From source file net.uiqui.oblivion.client.rest.RetryHandler.java

public class RetryHandler implements Interceptor {
    private Cluster cluster = null;

    public RetryHandler(final Cluster cluster) {
        this.cluster = cluster;
    }