{"record":{"id":"0b40e4db69fbb12a","repo":"DioxusLabs/dioxus","slug":"http-method-not-specified-in-macro-or-in-attribute","errorCode":null,"errorMessage":"HTTP method not specified in macro or in attribute","messagePattern":"HTTP method not specified in macro or in attribute","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"packages/fullstack-macro/src/lib.rs","lineNumber":737,"sourceCode":"                \"Cannot have multiple query parameters when one is a catch-all\",\n            ));\n        }\n\n        if let Some(options) = route.oapi_options.as_mut() {\n            options.merge_with_fn(function)\n        }\n\n        let method = match (method_from_macro, route.method) {\n            (Some(method), None) => method,\n            (None, Some(method)) => method,\n            (Some(_), Some(_)) => {\n                return Err(syn::Error::new(\n                    Span::call_site(),\n                    \"HTTP method specified both in macro and in attribute\",\n                ));\n            }\n            (None, None) => {\n                return Err(syn::Error::new(\n                    Span::call_site(),\n                    \"HTTP method not specified in macro or in attribute\",\n                ));\n            }\n        };\n\n        Ok(Self {\n            method,\n            route_lit: route.route_lit,\n            path_params: route.path_params,\n            query_params,\n            oapi_options: route.oapi_options,\n            prefix: route.prefix,\n            server_args: route.server_args,\n        })\n    }\n\n    pub fn query_is_catchall(&self) -> bool {","sourceCodeStart":719,"sourceCodeEnd":755,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/fullstack-macro/src/lib.rs#L719-L755","documentation":"`from_route` resolves the server function's HTTP method from either the macro options or the route attribute; if neither specifies one, this compile error fires. The developer must declare a method (e.g. `get = \"/path\"` in the #[server] options or via the route attribute).","triggerScenarios":"Thrown at packages/fullstack-macro/src/lib.rs:737 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Specify an HTTP method, e.g. by using #[get(...)]/#[post(...)] or adding the method in the route attribute."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}