2016-02-05 48 views
1

当前卷曲格式狂饮后用饼干和数据

curl -v --cookie "JSESSIONID=xxxxxxxxx" -X POST --data "[\"test\",\"password\"]" http://domain.com/register 

如何验证cookie的&使用后狂饮的数据?

$url = 'http://domain.com/register'; 
$client = new GuzzleHttp\Client(); 
$jar = new \GuzzleHttp\Cookie\CookieJar(); 
$register = $client->post($url, ['cookies' => $jar, 'http_errors' => false]); 

回答

0

使用form_params请求选项来发布数据。 使用debug请求选项来比较你的要求从古惑到卷曲请求。

SO中有很多例子,Guzzle文档很好地解释了事情。