This shows you the differences between two versions of the page.
ii:labs:03:tasks:02 [2024/11/07 12:02] florin.stancu [02. [20p] Making HTTP Requests] |
ii:labs:03:tasks:02 [2024/11/07 12:02] (current) florin.stancu [02. [20p] Making HTTP Requests] |
||
---|---|---|---|
Line 1: | Line 1: | ||
==== 02. [20p] Making HTTP Requests ==== | ==== 02. [20p] Making HTTP Requests ==== | ||
- | Now that we have the ''requests'' library, we can easily send HTTP requests to any URL. This prompts the server to respond with the information we need. When the request is successful, the server will reply with a standard status code: ''200'' (Success), indicating everything went smoothly. Simply replace the URL with the desired website (try a [[https://en.m.wikipedia.org/wiki/President_of_the_United_States|wikipedia page]]), and you’re ready to go! | + | Now that we have the ''requests'' library, we can easily send HTTP requests to any URL. This prompts the server to respond with the information we need. When the request is successful, the server will reply with a standard status code: ''200'' (Success), indicating everything went smoothly. Simply replace the URL with the desired website (try a [[https://en.m.wikipedia.org/wiki/List_of_presidents_of_the_United_States|wikipedia page]]), and you’re ready to go! |
<code python> | <code python> |