@@ -674,9 +674,9 @@ readers and writers for form data, multipart requests, and server-sent events.
674
674
==== Jackson JSON
675
675
676
676
JSON and binary JSON (https://github.com/FasterXML/smile-format-specification[Smile]) data
677
- formats are both supported.
677
+ formats are both supported with the Jackson library .
678
678
679
- The `Jackson2Decoder` uses Jackson's asynchronous, non-blocking parser to create a stream
679
+ `Jackson2Decoder` uses Jackson's asynchronous, non-blocking parser to create a stream
680
680
of ``TokenBuffer``'s and then each `TokenBuffer` is passed to Jackson's `ObjectMapper` to
681
681
create a higher level object. When decoding to a multi-value publisher (e.g. `Flux`), the
682
682
input stream can be a JSON array, or
@@ -703,6 +703,45 @@ use `Flux#collectToList()` and provide a `Mono<List<String>>` to be serialized.
703
703
704
704
705
705
706
+ [[webflux-codecs-forms]]
707
+ ==== Form Data
708
+
709
+ `FormHttpMessageReader` and `FormHttpMessageWriter` support decoding and encoding
710
+ "application/x-www-form-urlencoded" content.
711
+
712
+ On the server side where form content often needs to be accessed from multiple places,
713
+ `ServerWebExchange` provides a dedicated `getFormData()` method that parses the content
714
+ through `FormHttpMessageReader` and then caches the result for repeated access.
715
+ See <<webflux-form-data>> in the <<webflux-web-handler-api>> section.
716
+
717
+ Once `getFormData()` is used, the original raw content can no longer be read from the
718
+ request body. For this reason, applications are expected to go through `ServerWebExchange`
719
+ consistently for access to the cached form data versus reading from the raw request body.
720
+
721
+
722
+
723
+ [[webflux-codecs-multipart]]
724
+ ==== Multipart Data
725
+
726
+ `MultipartHttpMessageReader` and `MultipartHttpMessageWriter` support decoding and
727
+ encoding "multipart/form-data" content. In turn `MultipartHttpMessageReader` delegates to
728
+ another `HttpMessageReader` for the actual parsing to a `Flux<Part>` and then simply
729
+ collects the parts into a `MultiValueMap`. At present the
730
+ https://github.com/synchronoss/nio-multipart[Synchronoss NIO Multipart] is used for the
731
+ actual parsing.
732
+
733
+ On the server side where multipart form content may need to be accessed from multiple
734
+ places, `ServerWebExchange` provides a dedicated `getMultipartData()` method that parses
735
+ the content through `MultipartHttpMessageReader` and then caches the result for repeated access.
736
+ See <<webflux-multipart>> in the <<webflux-web-handler-api>> section.
737
+
738
+ Once `getMultipartData()` is used, the original raw content can no longer be read from the
739
+ request body. For this reason applications have to consistently use `getMultipartData()`
740
+ for repeated, map-like access to parts, or otherwise rely on the
741
+ `SynchronossPartHttpMessageReader` for a one-time access to `Flux<Part>`.
742
+
743
+
744
+
706
745
[[webflux-codecs-streaming]]
707
746
==== Streaming
708
747
[.small]#<<web.adoc#mvc-ann-async-http-streaming,Same as in Spring MVC>>#
0 commit comments