This crate is an extension to the popular gotham web framework for Rust. It aims to reduce boilerplate necessary to read request bodies today as a stop-gap until gotham finally implements a [body extractor].
application/x-www-form-urlencoded
request bodiesmultipart/form-data
request bodiesThis crate is synchronous. It loads the entire request body into memory. YOU ARE RESPONSIBLE FOR ENFORCING UPLOAD LIMITS. For this reason, file uploads are not supported, and this won't change before this crate switches to an async multipart parser.
```rust use gotham_formdata::FormData;
struct LoginData { #[validate(regex = "[a-zA-Z0-9]", error = "The username contains illegal characters.")] username: String, #[validate(minlength = 6)] password: String }
async fn loginhandler(state: &mut State) -> Result
Like all rust crates, this crate will follow semantic versioning guidelines. However, changing the MSRV (minimum supported rust version) is not considered a breaking change.
``` Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ```