The PUT request shows "HTTP/1.0 406 Not Acceptable: Missing node type" I have been trying to update a node data from the PUT request using cURL. bit due to some reason its showing "HTTP/1.0 406 Not Acceptable: Missing node type", I think the request is done proper but the data is not in proper format. Below is my code.

        $newSketchBoard = array(
          'title' =&gt; $title,
          'type' =&gt; 'rest_sketchboard_user',
          'field_sketchboarduser_user_id[und][0][value]'=&gt;$data['uid'],
          'field_sketchboard_paintjob_id[und]' =&gt; $data['paintjobid'],
          'field_sketchboard_template_id[und][0][value]' =&gt; $data['templateid'],
          'field_sketchboard_user_color_id1[und]' =&gt; $data['colorid1'],
          'field_sketchboard_user_color_id2[und]' =&gt; $data['colorid2'],
          'field_sketchboard_user_color_id3[und]' =&gt; $data['colorid3'],
          'field_sketchboard_user_color_id4[und]' =&gt; $data['colorid4'],
        );
        $entity_id=$sketchboard_data['entity_id'];
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_HEADER,true);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_TIMEOUT, 600);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt($ch, CURLOPT_COOKIE, "{$session_cookie}");
        curl_setopt($ch, CURLOPT_PUT, 1);
        curl_setopt($ch, CURLOPT_URL, REST_BASE_URL."/node/{$entity_id}");

        $putString = $newSketchBoard;
        // Put string into a temporary file
        $putData = tmpfile();
        // Write the string to the temporary file
        fwrite($putData, $putString);
        // Move back to the beginning of the file
        fseek($putData, 0);
        curl_setopt($ch, CURLOPT_INFILE, $putData); // file pointer
        curl_setopt($ch, CURLOPT_INFILESIZE, strlen($putString));    
        //curl_setopt($ch, CURLOPT_POSTFIELDS, $newSketchBoard);
        $result = curl_exec($ch);
        print_r($result);


I also tried using the following code, but it's not working.

$putString = json_encode($newSketchBoard);
$putString = http_build_query($newSketchBoard);
This ticket might be of some help.
http://drupal.org/node/1191786