twitter4j

## Class AlternativeHttpClientImpl

- java.lang.Object
- - twitter4j.HttpClientBase
  - - twitter4j.AlternativeHttpClientImpl

All Implemented Interfaces:
  Serializable, HttpClient, HttpResponseCode

    public class AlternativeHttpClientImpl
    extends HttpClientBase
    implements HttpResponseCode, Serializable

Since:
  Twitter4J 3.0.6
Author:
  Hiroaki Takeuchi - takke30 at gmail.com, Yuuto Uehara - muemi.himazin at gmail.com
See Also:
  Serialized Form

### Field Summary

Fields
`static boolean` `sPreferHttp2`
`static boolean` `sPreferSpdy`

### Fields inherited from interface twitter4j.HttpResponseCode

`BAD_GATEWAY, BAD_REQUEST, ENHANCE_YOUR_CLAIM, FORBIDDEN, FOUND, GATEWAY_TIMEOUT, INTERNAL_SERVER_ERROR, MULTIPLE_CHOICES, NOT_ACCEPTABLE, NOT_FOUND, NOT_MODIFIED, OK, SERVICE_UNAVAILABLE, TOO_MANY_REQUESTS, UNAUTHORIZED, UNPROCESSABLE_ENTITY`

### Constructor Summary

Constructors
Constructor and Description
`AlternativeHttpClientImpl()`
`AlternativeHttpClientImpl(HttpClientConfiguration conf)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static okhttp3.RequestBody` `createInputStreamRequestBody(okhttp3.MediaType mediaType, InputStream inputStream)`
`okhttp3.Protocol` `getLastRequestProtocol()`
`okhttp3.OkHttpClient` `getOkHttpClient()`

### Methods inherited from class twitter4j.HttpClientBase

`addDefaultRequestHeader, delete, delete, get, get, getRequestHeaders, head, post, post, put, put, request, request, write`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### sPreferSpdy

    public static boolean sPreferSpdy

#### sPreferHttp2

    public static boolean sPreferHttp2

### Constructor Detail

#### AlternativeHttpClientImpl

    public AlternativeHttpClientImpl()

#### AlternativeHttpClientImpl

    public AlternativeHttpClientImpl(HttpClientConfiguration conf)

### Method Detail

#### createInputStreamRequestBody

    public static okhttp3.RequestBody createInputStreamRequestBody(okhttp3.MediaType mediaType,
                                                                   InputStream inputStream)

#### getLastRequestProtocol

    public okhttp3.Protocol getLastRequestProtocol()

#### getOkHttpClient

    public okhttp3.OkHttpClient getOkHttpClient()