Skip to content

Commit

Permalink
Add support for HTTPS requests
Browse files Browse the repository at this point in the history
  • Loading branch information
swapagarwal committed Apr 20, 2016
1 parent a9a3421 commit f930dfe
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ More examples can be found [here](https://github.com/swapagarwal/JARVIS-on-Messe
### Local Development / Testing

1. Clone this repo.
2. `pip install -r requirements.txt`
3. `python jarvis.py`
4. Visit `http://localhost:5000/test/?q=<YOUR_QUERY>` to see results.
2. `sudo apt-get install python-dev libffi-dev libssl-dev`
3. `pip install -r requirements.txt`
4. `python jarvis.py`
5. Visit `http://localhost:5000/test/?q=<YOUR_QUERY>` to see results.
4 changes: 2 additions & 2 deletions modules/src/joke.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ def match(input):
def process(input):
output = {}
try:
r = requests.get('http://api.icndb.com/jokes/random')
r = requests.get('https://api.chucknorris.io/jokes/random')
data = r.json()
output['input'] = input
output['output'] = data['value']['joke']
output['output'] = data['value']
output['success'] = True
except:
output['success'] = False
Expand Down
10 changes: 10 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
cffi==1.5.2
cryptography==1.3.1
enum34==1.1.3
Flask==0.10.1
idna==2.1
ipaddress==1.0.16
itsdangerous==0.24
Jinja2==2.8
MarkupSafe==0.23
ndg-httpsclient==0.4.0
py==1.4.31
pyasn1==0.1.9
pycparser==2.14
pyOpenSSL==16.0.0
pytest==2.9.1
requests==2.9.1
six==1.10.0
Werkzeug==0.11.8

0 comments on commit f930dfe

Please sign in to comment.