carolinux / gdata-python-client

Automatically exported from code.google.com/p/gdata-python-client
0 stars 1 forks source link

If-Match or If-None-Match header or entry etag attribute required error while using batch update of contacts #699

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.update contact using batch contact api(gdata-python-client)  as like below

   request_feed = gdata.contacts.data.ContactsFeed()
   contact_entry = gd_client.GetContact(contact_url)
   request_feed.AddUpdate(entry=contact_entry, batch_id_string='update')
   response_feed = gd_client.ExecuteBatch(request_feed,
      'https://www.google.com/m8/feeds/contacts/default/full/batch')
   for entry in response_feed.entry:
      print '%s: %s (%s)' % (entry.batch_id.text, entry.batch_status.code, entry.batch_status.reason)

2. tried with adding below line 

   ifmatch_header = atom.client.CustomHeaders(**{"If-Match": "*"})
   response_feed = gd_client.ExecuteBatch(request_feed,
             'https://www.google.com/m8/feeds/contacts/default/full/batch', ifmatch_header=ifmatch_header)

What is the expected output? What do you see instead?

  I'm getting If-Match or If-None-Match header or entry etag attribute required

Please use labels and text to provide additional information.

Original issue reported on code.google.com by venkat...@test.mogocrm.com on 20 May 2014 at 8:05