What is pip:
pip is used for downloading and managing python packages/libraries.
Download the get-pip.py from internet:
Run the file with sudo:
sudo python get-pip.py
What is requests:
Requests is an elegant and simple HTTP library for Python.
sudo pip install requests
Create and edit a python file in Pi with
By the following code, we are able to make a simple GET request:
import requests base_url = 'http://192.168.1.19:3000' path = '/apis/hello' r = requests.get(base_url+path) status_code = r.status_code json_data = r.json()