Java com.squareup.okhttp RequestBody fields, constructors, methods, implement or subclass

Example usage for Java com.squareup.okhttp RequestBody fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.squareup.okhttp RequestBody.

The text is from its open source code.

Subclass

com.squareup.okhttp.RequestBody has subclasses.
Click this link to see all its subclasses.

Constructor

Method

longcontentLength()
Returns the number of bytes that will be written to out in a call to #writeTo , or -1 if that count is unknown.
MediaTypecontentType()
Returns the Content-Type header for this body.
RequestBodycreate(MediaType contentType, String content)
Returns a new request body that transmits content .
RequestBodycreate(final MediaType contentType, final ByteString content)
Returns a new request body that transmits content .
RequestBodycreate(final MediaType contentType, final byte[] content)
Returns a new request body that transmits content .
RequestBodycreate(final MediaType contentType, final File file)
Returns a new request body that transmits the content of file .
RequestBodycreate(final MediaType contentType, final byte[] content, final int offset, final int byteCount)
Returns a new request body that transmits content .
voidwriteTo(BufferedSink sink)
Writes the content of this request to out .