public class HeaderInterceptor
extends java.lang.Object
implements okhttp3.Interceptor
| Constructor and Description |
|---|
HeaderInterceptor(java.lang.String name,
java.lang.String value)
Create an arbitrary header adding interceptor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getName() |
java.lang.String |
getValue() |
okhttp3.Response |
intercept(okhttp3.Interceptor.Chain chain)
Method called by framework, to enrich current request chain with requested header information.
|
public HeaderInterceptor(java.lang.String name,
java.lang.String value)
name - of the header to be used.value - value of the new header.public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain)
throws java.io.IOException
intercept in interface okhttp3.Interceptorchain - the execution chain for the request.java.io.IOException - in case of failure down the line.public java.lang.String getName()
public java.lang.String getValue()
Copyright © 2019 Contentful, GmbH.. All Rights Reserved.