14,959
edits
| Line 24: | Line 24: | ||
<pre> | <pre> | ||
curl "https://www.example.com/path/to/resource/" -H "authority: www.example.com" -H "accept: text/html" --data-raw "PARAMS" > output.html | curl "https://www.example.com/path/to/resource/" -H "authority: www.example.com" -H "accept: text/html" --data-raw "PARAMS" > output.html | ||
</pre> | |||
== How to resolve cURL error: HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1) == | |||
Workaround solution<ref>[https://stackoverflow.com/questions/56865217/php-curl-error-http-2-stream-0-was-not-closed-cleanly-protocol-error-err-1 PHP Curl error HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1) - Stack Overflow]</ref>: | |||
<pre> | |||
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); | |||
</pre> | </pre> | ||