why my request url is not the same as my fetch
Unanswered
Yellowstripe scad posted this in #help-forum
Yellowstripe scadOP
I do not understand my server action point green url of my fetch but when I valid with the form it puts me on url of the local
6 Replies
@Yellowstripe scad I do not understand my server action point green url of my fetch but when I valid with the form it puts me on url of the local
To trigger a server action, nextjs sends a POST request to the same page with the parameter payload and the ID of the server action. That’s why you see a POST to localhost:3000/, because your page URL at the time of server action triggering is localhost:3000/
Yellowstripe scadOP
How do I make my server action work? use another method?
when use postman my request work
@Yellowstripe scad How do I make my server action work? use another method?
What do you mean? Doesn’t the server action already work?
The fetch to maroc-group-something doesn’t show up in the network tab because it is run on the server, not in the browser
The fetch to maroc-group-something doesn’t show up in the network tab because it is run on the server, not in the browser
Yellowstripe scadOP
i want to my fech Post my data simply
Yes and you are already doing that!? Not sure what you want to see, do you want to see the fetch to the firebase server reflected in the network tab? Then don’t use server actions and just fetch normally in an onSubmit or something