Module io.jooby
Package io.jooby

Interface Formdata

All Superinterfaces:
Iterable<ValueNode>, Value, ValueNode

public interface Formdata extends ValueNode
Form class for direct MVC parameter provisioning.

HTTP request must be encoded as MediaType.FORM_URLENCODED or MediaType.MULTIPART_FORMDATA.

Since:
2.0.0
Author:
edgar
  • Method Details

    • put

      @NonNull void put(@NonNull String path, @NonNull ValueNode value)
      Add a form field.
      Parameters:
      path - Form name/path.
      value - Form value.
    • put

      @NonNull void put(@NonNull String path, @NonNull String value)
      Add a form field.
      Parameters:
      path - Form name/path.
      value - Form value.
    • put

      @NonNull void put(@NonNull String path, @NonNull Collection<String> values)
      Add a form field.
      Parameters:
      path - Form name/path.
      values - Form values.
    • put

      void put(@NonNull String name, @NonNull FileUpload file)
      Put/Add a file into this multipart request.
      Parameters:
      name - HTTP name.
      file - File upload.
    • files

      @NonNull List<FileUpload> files()
      All file uploads. Only for multipart/form-data request.
      Returns:
      All file uploads.
    • files

      @NonNull List<FileUpload> files(@NonNull String name)
      All file uploads that matches the given field name.

      Only for multipart/form-data request.

      Parameters:
      name - Field name. Please note this is the form field name, not the actual file name.
      Returns:
      All file uploads.
    • file

      @NonNull FileUpload file(@NonNull String name)
      A file upload that matches the given field name.

      Only for multipart/form-data request.

      Parameters:
      name - Field name. Please note this is the form field name, not the actual file name.
      Returns:
      A file upload.
    • create

      @NonNull static Formdata create(@NonNull Context ctx)
      Creates a new multipart object.
      Parameters:
      ctx - Current context.
      Returns:
      Multipart instance.