setContentDispositionFormData method

void setContentDispositionFormData(
  1. String name,
  2. String filename
)
  • Set the (new) value of the Content-Disposition header
    • for form-data.

Implementation

void setContentDispositionFormData(String name, String filename) {
		assert(name != null);

		String builder = "form-data; name=\"";
		builder = "$builder$name\"";
		if (filename != null) {
			builder = "$builder; filename=\"";
			builder = "$builder$filename\"";
		}
		this.set(CONTENT_DISPOSITION, builder);
	}