-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Which project does this relate to?
Start
Describe the bug
export const publicServerFn = createServerFn().middleware([localeMiddleware]);
export const authenticatedServerFn = publicServerFn.middleware([authMiddleware]);this works, but there is a small problem. i get TS types for setting a method: "POST" | "GET", but it is not working, i always get a "GET" when setting a "POST"
authenticatedServerFn({ method: "POST" }).handler(...) // still results in a GETYour Example Website or App
https://codesandbox.io/p/devbox/silly-dan-3lxwm6?workspaceId=ws_6zSt1ovMaptBGeGs92eGau
Steps to Reproduce the Bug or Issue
- open the console tab and go to network tab
- click "Create Post"
- check in the network tab the request method
Expected behavior
When setting {method: "POST"} i expect the server function request to be a "POST" and not a "GET"
Screenshots or Videos
No response
Platform
- Router / Start Version: 1.136.4
- OS: macOS
- Browser: Chrome,
- Browser Version 142.0.7444.162 (Official Build) (arm64)
- Bundler: vite
- Bundler Version: 7.1.7
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels