Example usage for Java com.squareup.okhttp RequestBody fields, constructors, methods, implement or subclass
The text is from its open source code.
long | contentLength() Returns the number of bytes that will be written to out in a call to #writeTo , or -1 if that count is unknown. |
MediaType | contentType() Returns the Content-Type header for this body. |
RequestBody | create(MediaType contentType, String content) Returns a new request body that transmits content . |
RequestBody | create(final MediaType contentType, final ByteString content) Returns a new request body that transmits content . |
RequestBody | create(final MediaType contentType, final byte[] content) Returns a new request body that transmits content . |
RequestBody | create(final MediaType contentType, final File file) Returns a new request body that transmits the content of file . |
RequestBody | create(final MediaType contentType, final byte[] content, final int offset, final int byteCount) Returns a new request body that transmits content . |
void | writeTo(BufferedSink sink) Writes the content of this request to out . |