Curl
simple curl GET
``sh
curl "https://api.onesignal.com"
``
simple curl POST
``sh
curl -X "POST" "https://api.onesignal.com"
``
curl with json request and header
``sh
curl -X "POST" "https://iems.kpdn.gov.my/oauth/token" \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{
"client_id": "3",
"scope": "ecoss",
"client_secret": "v3v0kqaUPYkxO7tl3FprWcbD3pzyk7EgvnEBzLmk",
"grant_type": "client_credentials"
}'``
curl with full url
``sh
curl "https://familyhub.lppkn.gov.my/index.php/epms_api/LPPKNReportGateway?token=HEgAtuOHunGqmiMEVDUMjhTAYJRxyM&laporan=1004&tahun=2023&sukuan=1"
``
curl with hidden method (laravel)
``sh
curl -X "POST" "http://10.29.59.97/gps/gpss/50/budgets"
-d $'{
"_method": "PATCH",
"test": "somthing"
}'
``
curl with auth token in header
``sh
curl -X "POST" "http://10.29.59.97/gps/gpss/50/budgets" -H "Content-Type: application/x-www-form-urlencoded" -d "_method=PATCH&token=bgl2TOaY5IdSQRHQDEPKvZd1Y79N66fFNOaV4E9P"
``
No Comments