0
4
CFCodiga Fan #24465
The code above sends a POST request to the http://www.example.com/user/create page. The form_params variable contains the data that will be sent with the POST request. The email and name fields are required, while the password field is optional.
$client = new \GuzzleHttp\Client();
$client->post(
'http://www.example.com/user/create',
array(
'form_params' => array(
'email' => 'test@gmail.com',
'name' => 'Test user',
'password' => 'testpassword'
)
)
);