public class ContentTypeInterceptor
extends java.lang.Object
implements okhttp3.Interceptor
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
HEADER_NAME |
| Constructor and Description |
|---|
ContentTypeInterceptor(java.lang.String contentType)
Create Header interceptor, saving parameters.
|
| Modifier and Type | Method and Description |
|---|---|
okhttp3.Response |
intercept(okhttp3.Interceptor.Chain chain)
Method called by framework, to enrich current request with the header information requested.
|
public static final java.lang.String HEADER_NAME
public ContentTypeInterceptor(java.lang.String contentType)
contentType - type header to be send with all of the requestspublic 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 - if chain had an errorCopyright © 2018 Contentful, GmbH.. All Rights Reserved.