Package

fr.hmil.roshttp

body

Permalink

package body

Visibility
  1. Public
  2. All

Type Members

  1. trait BodyPart extends AnyRef

    Permalink
  2. class JSONBody extends BodyPart

    Permalink

    Allows to send arbitrarily complex JSON data.

  3. 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 StreamBody. 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.

  4. class PlainTextBody extends BodyPart

    Permalink

    Plain text body sent as text/plain mime type.

  5. class StreamBody extends BodyPart

    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.

  6. class URLEncodedBody extends BodyPart

    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 StreamBody 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 Implicits

    Permalink
  2. object JSONBody

    Permalink
  3. object MultiPartBody

    Permalink
  4. object PlainTextBody

    Permalink
  5. object StreamBody

    Permalink
  6. object URLEncodedBody

    Permalink

Ungrouped