We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df45630 commit 4fe11bbCopy full SHA for 4fe11bb
snippets/python/requests.md
@@ -0,0 +1,19 @@
1
+# Make a HTTP request
2
+
3
+*tags:* python, requests
4
5
+`requests`: The datetime module supplies classes for manipulating dates and times.
6
+ The requests module allows you to send HTTP/1.1 requests and parse a response
7
8
+### Snippet
9
+```
10
+import requests
11
12
+name = str(input())
13
+req = requests.get("https://github.com/" + name)
14
+response = req.status_code
15
+if response == 404:
16
+ print("This does not exist")
17
+else:
18
+ print("This exists")
19
0 commit comments