Question: Question 4. (CL03) (8 marks) Write Python code to do the following operations using request library. [8 marks] Send a get request to https://api.github.com and
Question 4. (CL03) (8 marks) Write Python code to do the following operations using request library. [8 marks] Send a get request to https://api.github.com and display the status code from the response object [2marks] 2. Send a get request to https://api.github.com and display the headers information from the response object [2 marks) 3. Send a get request to https://api.github.com and display the contents information from the response object [2 marks) 4. Send a get request to http://httpbin.org/headers Change the user-agent value to "IPhone 10". Display the text information from the response object highlight the user-agent value. [2 marks] Sample run of the program: Paste you Answer Here Copy the code and past is her Take a screenshot of the code and the run of the program and paste it here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
