public class ContentTypeInterceptor extends Object implements okhttp3.Interceptor
| Modifier and Type | Field and Description |
|---|---|
static String |
HEADER_NAME |
| Constructor and Description |
|---|
ContentTypeInterceptor(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 String HEADER_NAME
public ContentTypeInterceptor(String contentType)
contentType - type header to be send with all of the requestspublic okhttp3.Response intercept(okhttp3.Interceptor.Chain chain)
throws IOException
intercept in interface okhttp3.Interceptorchain - the execution chain for the request.IOException - if chain had an errorCopyright © 2017 Contentful, GmbH.. All Rights Reserved.