Package io.freefair.spring.okhttp.client
Class OkHttpClientRequest
java.lang.Object
org.springframework.http.client.AbstractClientHttpRequest
io.freefair.spring.okhttp.client.OkHttpClientRequest
- All Implemented Interfaces:
org.springframework.http.client.ClientHttpRequest
,org.springframework.http.HttpMessage
,org.springframework.http.HttpOutputMessage
,org.springframework.http.HttpRequest
,org.springframework.http.StreamingHttpOutputMessage
public class OkHttpClientRequest
extends org.springframework.http.client.AbstractClientHttpRequest
implements org.springframework.http.StreamingHttpOutputMessage
OkHttp based
ClientHttpRequest
implementation.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.http.StreamingHttpOutputMessage
org.springframework.http.StreamingHttpOutputMessage.Body
-
Constructor Summary
ConstructorDescriptionOkHttpClientRequest
(okhttp3.OkHttpClient okHttpClient, URI uri, org.springframework.http.HttpMethod method) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.http.client.ClientHttpResponse
executeInternal
(org.springframework.http.HttpHeaders headers) protected OutputStream
getBodyInternal
(org.springframework.http.HttpHeaders headers) org.springframework.http.HttpMethod
getURI()
void
setBody
(org.springframework.http.StreamingHttpOutputMessage.Body body) Methods inherited from class org.springframework.http.client.AbstractClientHttpRequest
assertNotExecuted, execute, getAttributes, getBody, getHeaders
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.http.HttpMessage
getHeaders
Methods inherited from interface org.springframework.http.HttpOutputMessage
getBody
-
Constructor Details
-
OkHttpClientRequest
public OkHttpClientRequest(okhttp3.OkHttpClient okHttpClient, URI uri, org.springframework.http.HttpMethod method)
-
-
Method Details
-
getMethod
- Specified by:
getMethod
in interfaceorg.springframework.http.HttpRequest
-
getURI
- Specified by:
getURI
in interfaceorg.springframework.http.HttpRequest
-
setBody
- Specified by:
setBody
in interfaceorg.springframework.http.StreamingHttpOutputMessage
-
getBodyInternal
- Specified by:
getBodyInternal
in classorg.springframework.http.client.AbstractClientHttpRequest
-
executeInternal
protected org.springframework.http.client.ClientHttpResponse executeInternal(org.springframework.http.HttpHeaders headers) throws IOException - Specified by:
executeInternal
in classorg.springframework.http.client.AbstractClientHttpRequest
- Throws:
IOException
-