简体   繁体   中英

how to get proper (full) image path with extension from google api result

I am using google oauth 2.0 playground API, its giving ma the result of contact's but the problem is its not giving the full image name with extension as well.

below result I am getting

    <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" href="https://www.google.com/m8/feeds/photos/media/xxxx@test.com/2d4aaf09b20bb7"/>
  <link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/xxxx@test.com/full/2d4aaf09b20bb7"/>
  <link rel="edit" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/xxxx@test.com/full/2d4aaf09b20bb7"/>

what I have to do for getting image src with extension ?

There is no "filename" or "extension". When you send an authenticated request to the URL you will get an HTTP response with a content-type in the header telling what kind of format it is along with the photo bytes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM