1
0
forked from tdwojak/Python2017
Python2017/labs03/task00.py
2017-12-02 15:27:46 +01:00

12 lines
279 B
Python

import requests
message = input('Enter a Message: ')
number = input('Enter the phone number: ')
payload = {'number': number, 'message': message}
r = requests.post("http://textbelt.com/text", data=payload)
if r.json()['success']:
print('Success!')
else:
print('Error!')