I need to get a key value of HttpResponse from some URL and send the value again to the url to get some results through Restapi
resp = requests.get('https://someurl.io')
data = HttpResponse(resp)
return data
with this code i got a response like,
{"status":200,"result":{"postcode":"BN14 9GB","quality":1,"eastings":515087,"northings":105207,"country":"England","nhs_ha":"South East Coast","longitude":-0.36701,"latitude":50.834955,"european_electoral_region":"South East","primary_care_trust":"West Sussex","admin_ward":"Offington","ced":"Cissbury","ccg":"NHS Coastal West Sussex","nuts":"West Sussex (South West)","codes":{"admin_district":"E07000229","admin_county":"E10000032","admin_ward":"E05007703","parish":"E43000150","parliamentary_constituency":"E14000682","ccg":"E38000213","ced":"E58001617","nuts":"UKJ27"}}}
I have to send only the latitude and longitude value to some URL and get results. I would like to do this in rest api. I dont know how to get only latitude and longitude value and through the value how to get response from someurl.io.
data.json()['result'], and thus then construct a new dictionary.