curl post request example
Example 1: curl post json
curl -X POST -H "Content-Type: application/json" \
-d '{"username":"abc","password":"abc"}' \
https:
Example 2: php curl post
$post = [
'username' => 'user1',
'password' => 'passuser1',
'gender' => 1,
];
$ch = curl_init('http://www.example.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = curl_exec($ch);
curl_close($ch);
var_dump($response);
Example 3: curl post request
curl -d "user=user1&pass=abcd" -X POST https:
Example 4: curl post
curl --data '' https:
curl -X POST https:
curl --request POST https:
Example 5: how to send http post create request using curl command
$ curl -X POST -d @filename http:
Example 6: curl pass data in request
curl -d "param1=value1¶m2=value2" -X POST http: