Skip to content

Commit

Permalink
Update multipart-form/README.md
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Fowler <[email protected]>
  • Loading branch information
Joannis and adam-fowler authored Sep 15, 2024
1 parent 9023ad2 commit c2ffc92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion multipart-form/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Application demonstrating working with HTML forms using multipart form data. Set

This example uses the [MultipartKit](https://github.com/vapor/multipart-kit) package for decoding the multipart form data sent by the web browser. The HTML form is generated using the [Mustache](https://github.com/hummingbird-project/swift-mustache) library. A new type `HTML` is added that conforms to `ResponseGenerator`. This generates a response with the `HTML` text contents and a `content-type` header set to `text/html`.

It also adds a new `RequestDecoder` called `MultipartRequestDecoder` that checks the header value `content-type` and if its media type is `.multipartForm` then decodes request using `FormDataDecoder` from the MultipartKit package. Other data will result in the app returning "unsupported media type".
It also adds a new `RequestDecoder` called `MultipartRequestDecoder` that checks the header value `content-type` and if its media type is `.multipartForm` then decodes request using `FormDataDecoder` from the MultipartKit package. Other content types will result in the app returning "unsupported media type".

0 comments on commit c2ffc92

Please sign in to comment.