Replies: 1 comment
-
|
I tried to replicate your issues here https://stackblitz.com/edit/github-ovtvaqwc?file=app%2Froutes%2Fhome.tsx, and it seems to work. I created a route with a loader and an action, and I render a message with the request.method, along a form that will do a document request with method POST. When you first enter the browser does a GET but when you submit the form it does a POST and show that on the UI. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello I have a react-router route that I use to render and print programmatically (using CURL or nodejs fetch) a detail-page based on request input data.
Initially I used query-params and fetch them using the loader, but then I realized the URL + queryparm was too long and hitting some limitation in the backend
Because of that I decided to switch from GET to POST and use
actioninstead ofloaderbut apparently whenever I do a POST request no matter the Content-Type (application/json , multi-part/form, ...) the action is never invoked and the loader instead interpret somehow the request as GET and therefore loosing the body content of the POSTDo anybody know how to render a page in react-router using POST instead of GET?
Here is my code:
Beta Was this translation helpful? Give feedback.
All reactions