REST - ERROR #6097: Error '<READ>Read+28^%Net.HttpRequest.1' while using TCP/IP device '9999'
Trying my first REST call operation to our internal EMR (Epic) server, and I am receiving "ERROR #6097: Error '<READ>Read+28^%Net.HttpRequest.1' while using TCP/IP device '9999'" when I attempt to test my operation. When I look up the General Error Messages for 6097 I am seeing...Error '%1' while using TCP/IP device $zu(189,1)='%2'. What does this mean?
I am trying to connect to the server over port 443 which is HTTPS but I am not using an SSL Configuration. Could that be the issue?
Is there a way to debug HTTP like their is with the ISCSOAP log?
Comments
Yes. Needs to use an SSL Configuration for HTTPS. Otherwise connection will close as handshake fails.
I tend to isolate to test a connection from server context if possible:
set request=##class(%Net.HttpRequest).%New()
set request.Server="www.intersystems.com"
set request.Port=443
set request.SSLConfiguration="TEST"
set request.Https=1
set tSC=request.Get("/",2)
do $SYSTEM.Status.DisplayError(tSC)Switching the SSL off causes the error:
set request.Https=0
set tSC=request.Get("/",2)
do $SYSTEM.Status.DisplayError(tSC)
ERROR #6097: Error '<READ>Read+28^%Net.HttpRequest.1' while using TCP/IP device '9999'