Simple Post request without render or redirect #1155
-
I just want a simple post request with Inertia. Is this possible somehow with inertia? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@Muetze42 you can do simple Inertia provides a way to properly render your app with either vue/swelte/react and adds some helpers to ease communication between client and server but you can build your own way if it doesn't fit your use cases. Could you also provide an example as there are other possible answers? |
Beta Was this translation helpful? Give feedback.
-
OK. Currently I just created an auth with token and use Axios.... |
Beta Was this translation helpful? Give feedback.
@Muetze42 you can do simple
fetch()
I believe. You would need to include the proper headers for authenticated requests. For that, you can inspect the request from the browser and adapt accordingly. For incoming request to you server, use the logic you need as it is agnostic as regards to inertia.Inertia provides a way to properly render your app with either vue/swelte/react and adds some helpers to ease communication between client and server but you can build your own way if it doesn't fit your use cases.
Could you also provide an example as there are other possible answers?