DioxusLabs/dioxus · error
expected one of (GET, POST, PUT, DELETE, HEAD, CONNECT, OPTI
Error message
expected one of (GET, POST, PUT, DELETE, HEAD, CONNECT, OPTIONS, TRACE)
What it means
A route method string passed to the fullstack macro did not match any supported HTTP verb. new_from_string only recognizes GET, POST, PUT, DELETE, HEAD, CONNECT, OPTIONS, TRACE, and PATCH; anything else falls through to the error arm.
Source
Thrown at packages/fullstack-macro/src/lib.rs:1463
Self::Connect(span) => Ident::new("connect", span.span()),
Self::Options(span) => Ident::new("options", span.span()),
Self::Trace(span) => Ident::new("trace", span.span()),
Self::Patch(span) => Ident::new("patch", span.span()),
}
}
fn new_from_string(s: &str) -> Self {
match s.to_uppercase().as_str() {
"GET" => Self::Get(Ident::new("GET", Span::call_site())),
"POST" => Self::Post(Ident::new("POST", Span::call_site())),
"PUT" => Self::Put(Ident::new("PUT", Span::call_site())),
"DELETE" => Self::Delete(Ident::new("DELETE", Span::call_site())),
"HEAD" => Self::Head(Ident::new("HEAD", Span::call_site())),
"CONNECT" => Self::Connect(Ident::new("CONNECT", Span::call_site())),
"OPTIONS" => Self::Options(Ident::new("OPTIONS", Span::call_site())),
"TRACE" => Self::Trace(Ident::new("TRACE", Span::call_site())),
"PATCH" => Self::Patch(Ident::new("PATCH", Span::call_site())),
_ => panic!("expected one of (GET, POST, PUT, DELETE, HEAD, CONNECT, OPTIONS, TRACE)"),
}
}
}
mod kw {
syn::custom_keyword!(with);
}
/// The arguments to the `server` macro.
///
/// These originally came from the `server_fn` crate, but many no longer apply after the 0.7 fullstack
/// overhaul. We keep the parser here for temporary backwards compatibility with existing code, but
/// these arguments will be removed in a future release.
#[derive(Debug)]
#[non_exhaustive]
#[allow(unused)]
struct ServerFnArgs {
/// The name of the struct that will implement the server function traitView on GitHub (pinned to 24f6a829df)
Solutions
- Use one of the supported HTTP methods in the server function attribute: GET, POST, PUT, DELETE, HEAD, CONNECT, OPTIONS, or TRACE.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/fullstack-macro/src/lib.rs:1463 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23).
Data as JSON: /api/errors/f22d6b407367b9eb.
Report an issue: GitHub.