clairenied15 / heart_rate_sentinel_server

0 stars 0 forks source link

How to validate that my GET requests are working #7

Closed clairenied15 closed 5 years ago

clairenied15 commented 5 years ago

I could easily check to see if my post requests were working and see the dictionaries I was sending, but it is not as clear to me how to validate the functions with GET requests. Can I just say

r = requests.get("http://127.0.0.1:5000/api/heart_rate/1") answer = r.json() print(answer)

and expect the answer to be the thing that's being returned in the function or do I need to pass info into it somehow to get an answer?