如何将 Php CURL 请求转换为命令行 curl
如何将以下 php curl 请求转换为 curl 可执行命令。
$curlOpts = array(
CURLOPT_PORT => "3000",
CURLOPT_URL => 'www.example.com',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array("Cookie: connect.sid=aASD234SDFfds", "content-type:application/json"),
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => {"email": "test.com",
"password": "123456"},
);
curl_setopt_array($ch, $curlOpts);
$output = curl_exec($ch);
我想要的受人尊敬的卷曲命令
curl -X GET --header 'Accept: application/json' 'http://www.example.com?sort=clicks&order=des'
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \
"email": "test.com", \
"password": "123456" \
}' 'http://example.com/login'
请帮帮我一样。