edit

Multipart forms

Multipart form support is provided on 2 levels:

  1. Through the creation of a MultipartFormBody which can be set on a Request.
  2. Using the Lens system, which adds the facility to define form fields in a typesafe way, and to validate form contents (in either a strict (400) or "feedback" mode).

Gradle setup

    compile group: "org.http4k", name: "http4k-core", version: "2.35.1"
    compile group: "org.http4k", name: "http4k-multipart", version: "2.35.1"

Standard (non-typesafe) API

Lens (typesafe, validating) API - reads ALL contents onto disk/memory

Streaming - iterate over Multiparts

Processing Files with a Filter and convert to standard form