@nschutz ,
carroll-ccsd comments reminded me that there are two ways to send the payload with PUT. You can make it part of the Query String attached to the end of the URL or you can include it as part of the post like you would with a POST. With something long like an entire wiki page, you would definitely want to use the post approach and not as part of the URL. The URL itself is really short, most of it is in the CURLOPT_POSTFIELDS. The examples from the API that Robert linked to show the body of the cURL as the -d option rather than in the URL itself.
In my PHP, I have something like this for a PUT statement. I'm using JSON to encode the object. This is pieced together from several different blocks, so hopefully I got it all.
$data_string = json_encode( $options );
$http_headers = array (
'Authorization: Bearer ' . $token,
'Content-Type: application/json',
'Content-Length: ' . strlen( $data_string )
);
$ch = curl_init( $url );
curl_setopt_array( $ch, array (
CURLOPT_HTTPHEADER => $http_headers,
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_VERBOSE => FALSE,
CURLOPT_HEADER => TRUE,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => $data_string
) );
$response = curl_exec( $ch );
You might also need to add a header of 'Accept: application/json' and there is obviously some additonal logic that needs included, I was just trying to get the part about the PUT statement to work.