Closed jimhavrilla closed 4 years ago
If running this test script on reslnklab01:
reslnklab01
import requests import json # for string-based match. faster. url = "http://localhost:8000/doc2hpo/parse/acdat" json = { "note": "He denies synophrys.", "negex": True } # headers = {'Content-type': 'application/json', 'Accept': 'text/plain'} r = requests.post(url,json = json) print(r.json())
You obtain the output:
{'hmName2Id': [{'start': 10, 'length': 9, 'hpoId': 'HP:0000664', 'hpoName': 'synophrys', 'negated': True}], 'hpoOption': False}
Because of the http.
If you run the same script with https:
https
import requests import json # for string-based match. faster. url = "https://localhost:8000/doc2hpo/parse/acdat" json = { "note": "He denies synophrys.", "negex": True } # headers = {'Content-type': 'application/json', 'Accept': 'text/plain'} r = requests.post(url,json = json) print(r.json())
You get the error:
requests.exceptions.SSLError: HTTPSConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /doc2hpo/parse/acdat (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')])")))
done with commit 7e13523f0b310f7d42dd632c91a144a2e069afc3
If running this test script on
reslnklab01
:You obtain the output:
Because of the http.
If you run the same script with
https
:You get the error: