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

    Constructors
    Constructor
    Description
    OkHttpClientRequest(OkHttpClient okHttpClient, URI uri, org.springframework.http.HttpMethod method)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.springframework.http.client.ClientHttpResponse
    executeInternal(org.springframework.http.HttpHeaders headers)
     
    protected OutputStream
    getBodyInternal(org.springframework.http.HttpHeaders headers)
     
    org.springframework.http.HttpMethod
     
     
    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

  • Method Details

    • getMethod

      public org.springframework.http.HttpMethod getMethod()
      Specified by:
      getMethod in interface org.springframework.http.HttpRequest
    • getURI

      public URI getURI()
      Specified by:
      getURI in interface org.springframework.http.HttpRequest
    • setBody

      public void setBody(org.springframework.http.StreamingHttpOutputMessage.Body body)
      Specified by:
      setBody in interface org.springframework.http.StreamingHttpOutputMessage
    • getBodyInternal

      protected OutputStream getBodyInternal(org.springframework.http.HttpHeaders headers)
      Specified by:
      getBodyInternal in class org.springframework.http.client.AbstractClientHttpRequest
    • executeInternal

      protected org.springframework.http.client.ClientHttpResponse executeInternal(org.springframework.http.HttpHeaders headers) throws IOException
      Specified by:
      executeInternal in class org.springframework.http.client.AbstractClientHttpRequest
      Throws:
      IOException