Class HttpRequestBody


  • public class HttpRequestBody
    extends okhttp3.RequestBody
    RequestBody that wraps a single data object.
    • Constructor Detail

      • HttpRequestBody

        public HttpRequestBody​(String contentType,
                               Object data,
                               int len)
    • Method Detail

      • contentType

        public okhttp3.MediaType contentType()
        Specified by:
        contentType in class okhttp3.RequestBody
      • contentLength

        public long contentLength()
        Overrides:
        contentLength in class okhttp3.RequestBody
      • writeTo

        public void writeTo​(okio.BufferedSink sink)
                     throws IOException
        Specified by:
        writeTo in class okhttp3.RequestBody
        Throws:
        IOException