Skip to content

How to perform POST requests? #179

Closed Answered by Sammyjo20
alphaolomi asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @alphaolomi!

You should make sure you set your request's $method property to POST (or PUT/PATCH depending on your API) and then Saloon will send a POST request instead of a GET request.

To send data have a read through this part of the documentation: https://docs.saloon.dev/the-basics/request-body-data

Let me know if you get stuck and let me know what kind of API data the API will accept. I assume it's JSON from the name,

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@alphaolomi
Comment options

Answer selected by alphaolomi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants