Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python 1. 2. a) Suppose you are working on a program that requires an API call to some website called http://ww.booisawesome.com. We wish to access

Python

1.

image text in transcribed

2.

image text in transcribed

image text in transcribed

a) Suppose you are working on a program that requires an API call to some website called http://ww.booisawesome.com. We wish to access the customers API webpage of the website-the API takes the following two parameters: date 12-5-16 search dog Write the encoded URL that we would use in order to send a HTTPS request to the web API for the BoolsAwesome website in the box below. b) When programming a function to generate the encoded URL as you wrote in part (a), why do we use the function urlib.parse.urlencode instead of just concatenating a string for the URL ourselves? (c) After getting the result of the HTTPS request from part (a), we parse the JSON response. Why do we use the json library to parse the JSON response? In other words, how did the library make it easier for a program to process the information in the JSON response? (d) What is the purpose of using protocols in writing programs

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions