简体   繁体   中英

headers response without location

I need information about location from Network Response. When I send post method I tried print body of response, and i get for example : {"_id":"12313124", "name":"NameElement", "address":"AddressStreet"} I need separate only id, because I need this to my tests (edit and delete). How I can do this ?

My code:

r = requests.post(*args)
print(r.response)
print(r.headers)

如果_id是您所说的“仅分隔ID”,请尝试r.response['_id']

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