“If-Match or If-None-Match header or entry etag attribute required” Error when trying to update a contact on google contacts using Zend Framework

前端 未结 1 1398
走了就别回头了
走了就别回头了 2021-01-16 07:16

Hi guys I\'m trying to update my google contacts using the zend framework but I\'m getting the following error:

Expected response code 200, got 403 If-Match          


        
相关标签:
1条回答
  • 2021-01-16 07:18

    i got a solution in http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14476692

    here is the message from that link:

    // in listing 6... // somewhere before the updateEntry call add: $extra_header = array(); $extra_header='*';

    // and then replace the current updateEntry call with the following: $entryResult = $gdata->updateEntry($xml->saveXML(),$entry->getEditLink()->href,null,$extra_header);

    Updates to Google Contacts now work.

    i get it work for my code. again there is a problem with the code in the post as well. that is

    $extra_header = array(); 
    
    $extra_header = array('If-Match'=>'*'); 
    
    $entryResult  = $contactObj->updateEntry($xml->saveXML(),$entry->getEditLink()->href,null,$extra_header);
    

    I think it will help you solve the update problem as well.

    thanks

    0 讨论(0)
提交回复
热议问题