Expose HTTP PUT when supported, props mdawaffe, fixes #10855
git-svn-id: https://develop.svn.wordpress.org/trunk@11977 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1ef0620a33
commit
343e591c2b
@ -1121,6 +1121,9 @@ class WP_Http_ExtHTTP {
|
||||
case 'HEAD':
|
||||
$r['method'] = HTTP_METH_HEAD;
|
||||
break;
|
||||
case 'PUT':
|
||||
$r['method'] = HTTP_METH_PUT;
|
||||
break;
|
||||
case 'GET':
|
||||
default:
|
||||
$r['method'] = HTTP_METH_GET;
|
||||
@ -1306,6 +1309,10 @@ class WP_Http_Curl {
|
||||
curl_setopt( $handle, CURLOPT_POST, true );
|
||||
curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] );
|
||||
break;
|
||||
case 'PUT':
|
||||
curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'PUT' );
|
||||
curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] );
|
||||
break;
|
||||
}
|
||||
|
||||
if ( true === $r['blocking'] )
|
||||
|
Loading…
Reference in New Issue
Block a user