Package

fr.hmil.roshttp

body

Permalink

package body

Visibility
  1. Public
  2. All

Type Members

  1. trait BodyPart extends AnyRef

    Permalink
  2. abstract class BulkBodyPart extends BodyPart

    Permalink
  3. class ByteBufferBody extends BulkBodyPart

    Permalink

    A body containing raw binary data

    A body containing raw binary data

    Usage: Stream bodies are used to send arbitrary binary data such as audio, video or any other file attachment. The content-type can be overridden to something more specific like image/jpeg or audio/wav for instance. It is common to embed a stream body in a MultiPartBody to send additional information with the binary file. When possible, send a Content-Length header along with an octet-stream body. It may allow the receiver end to better handle the loading.

    A stream body is sent with the content-type application/octet-stream.

  4. class JSONBody extends BulkBodyPart

    Permalink

    Allows to send arbitrarily complex JSON data.

  5. class MultiPartBody extends BodyPart

    Permalink

    A body made of multiple parts.

    A body made of multiple parts.

    Usage: A multipart body acts as a container for other bodies. For instance, the multipart body is commonly used to send a form with binary attachments in conjunction with the ByteBufferBody. For simple key/value pairs, use URLEncodedBody instead.

    Safety consideration: A random boundary is generated to separate parts. If the boundary was to occur within a body part, it would mess up the whole body. In practice, the odds are extremely small though.

  6. class PlainTextBody extends BulkBodyPart

    Permalink

    Plain text body sent as text/plain mime type.

  7. class StreamBody extends BodyPart

    Permalink
  8. class URLEncodedBody extends BulkBodyPart

    Permalink

    An urlencoded HTTP body.

    An urlencoded HTTP body.

    Usage: urlencoded bodies are best suited for simple key/value maps of strings. For more structured data, use JSONBody. For binary data, use ByteBufferBody or MultiPartBody.

    URLEncoded bodies are associated with the mime type "application/x-www-form-urlencoded" and look like query string parameters (eg. key=value&key2=value2 ).

Value Members

  1. object ByteBufferBody

    Permalink
  2. object Implicits

    Permalink
  3. object JSONBody

    Permalink
  4. object MultiPartBody

    Permalink
  5. object PlainTextBody

    Permalink
  6. object StreamBody

    Permalink
  7. object URLEncodedBody

    Permalink

Ungrouped