, , , , , $post , , , , . , , :
Array(
1 => Array(
'authentication' => 'some data here'
),
2 => Array(
'client' => 'some more data here'
)
)
$post var :
Array(
'authentication' => 'some data here',
'client' => 'some more data here'
)
- ( , ):
$authentication = $authentication->toJson();
$client = $client->toJson();
$post = array_merge($authentication, $client);
$resp = curl_post("http://localhost:8080/login", array(),
array(CURLOPT_HTTPHEADER => array('Content-Type: application/json'),
CURLOPT_POSTFIELDS => $post));