Skip to content

Commit 0938c6b

Browse files
committed
Initial Commit
1 parent 7af4228 commit 0938c6b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

wrapper.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import requests,json
2+
3+
4+
def getJSON(url):
5+
url = 'https://api.myjson.com/bins/1dcvl'
6+
r = requests.get(url)
7+
#print(r.json()["url"])
8+
return r.json()
9+
10+
11+
def postJSON(data):
12+
url = 'https://api.myjson.com/bins'
13+
#data={"some":"data"}
14+
headers={'content-type':'application/json'}
15+
r = requests.post(url,data=json.dumps(data),headers=headers)
16+
return r.content()
17+

0 commit comments

Comments
 (0)