Introduce PartEvent

This commit introduces the PartEvent API. PartEvents are either
- FormPartEvents, representing a form field, or
- FilePartEvents, representing a file upload.

The PartEventHttpMessageReader is a HttpMessageReader that splits
multipart data into a stream of PartEvents. Form fields generate one
FormPartEvent; file uploads produce at least one FilePartEvent. The last
element that makes up a particular part will have isLast set to true.

The PartEventHttpMessageWriter is a HttpMessageWriter that writes a
Publisher<PartEvent> to a outgoing HTTP message. This writer is
particularly useful for relaying a multipart request on the server.

Closes gh-28006
This commit is contained in:
Arjen Poutsma
2022-02-10 11:04:30 +01:00
parent 081c6463e9
commit be7fa3aaa8
22 changed files with 1436 additions and 56 deletions

View File

@@ -0,0 +1,9 @@
--boundary
Part: 1
--boundary
Part: 2
a
--boundary--