$client = new GuzzleHttpClient();
$response = $client->get('http://www.server.com/endpoint', [
'auth' => [
'username',
'password'
]
]);
$post_data = array(
'title' => 'My work',
'description' => 'This is a request created using curl',
'submit' => 'submit',
);
$response = $http_client->post('/create.php', array(), $post_data)->send();