bynk.http.form_unknown_arg
Error A @form annotation is given an argument; it takes none.
@form takes no arguments. A form body is always application/x-www-form-urlencoded, so there is no media type to name, and a size ceiling belongs to @limit or a limits { } section, not to the annotation. An argument is refused rather than ignored, which would leave the route behaving otherwise than you wrote. Write @form bare. @multipart takes none either. @raw takes contentType:: bynk.http.raw_unknown_arg.
Example
type Signup = { email: String }
@form(contentType: "application/x-www-form-urlencoded") // ✗ `@form` takes no argumenton POST("/signup") (body: Signup) -> Effect[HttpResult[()]] by v: Visitor { … }
@form // ✓on POST("/signup") (body: Signup) -> Effect[HttpResult[()]] by v: Visitor { … }In the Book
See also
- Every code in its category, HTTP, on the diagnostic index.
bynk explain bynk.http.form_unknown_argshows the same from the installed toolchain, without a network.