If-Match or If-None-Match header or entry etag attribute required error while updating batch contacts

324 Views Asked by At

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 If-match header to request as mentioned in document

 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

0

There are 0 best solutions below