# 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&amp;laporan=1004&amp;tahun=2023&amp;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&amp;token=bgl2TOaY5IdSQRHQDEPKvZd1Y79N66fFNOaV4E9P"  
``