- Official Docs
- In Postman we can click on Code Snippet to show the cURL command (and other command too).
General
Note that, -X = --request
- The most important options/flags
cURL in PHP
Info
We need to install extensions php-curl
to use it. Checkthe Official Documentation to learn more
Send Request
- Init cURL
- GET method
- POST method
Response
- Body response
- Status code ???
Some examples
GET
POST
The JSON data must be in the form of '{with the "double quotes" inside}'
. This "{single 'quote' inside}"
will not work!
or with JSON
file
or form data
We have a form that can upload file