[Stackoverflow] [Progress OpenEdge ABL] Secure Socket Layer (SSL) failure - error code 0: Unknown SSL error (9318) on HTTP GET Request

  • Thread starter Thread starter Smokus
  • Start date Start date
Status
Not open for further replies.
S

Smokus

Guest
This is my first time using any kind of HTTP request in OpenEdge ABL, so I am pretty confused with the error message.

I have the following code:

Code:
using OpenEdge.Net.HTTP.*.
using OpenEdge.Net.URI.
using Progress.Json.ObjectModel.*.
using OpenEdge.Net.HTTP.Credentials.

define variable oURI         as URI           no-undo.
define variable oClient      as IHttpClient   no-undo.
define variable oRequest     as IHttpRequest  no-undo.
define variable oResponse    as IHttpResponse no-undo.
define variable oJsonObject  as JsonObject    no-undo.
define variable JsonString   as longchar      no-undo.
define variable oCredentials as Credentials   no-undo.

/* Benutzername und Passwort */
define variable username     as character     no-undo initial 'user4name':U.
define variable password     as character     no-undo initial '4admin':U.

oCredentials = new Credentials('application':U,username,password). 

//Build a request
oURI = URI:Parse('https://dms.com/api/v1/projects/packages':U).                                                              
oRequest = RequestBuilder:Get(oURI):UsingBasicAuthentication(oCredentials):Request.

//Execute a request    
oClient = ClientBuilder:Build():Client.
oResponse = oClient:Execute(oRequest).
    
//Process the response
if oResponse:StatusCode <> 200 then
    return error "Request Error: " + STRING(oResponse:StatusCode).
else
do:

    oJsonObject = cast(oResponse:Entity, JsonObject).
    oJsonObject:Write(JsonString, true).
    message string(JsonString).

end. /* if oResponse:StatusCode <> 200 */

I've changed out the HTTP Link and username/password values because I don't want to leak internal data.

After I run the procedure (with the correct HTTP Link and username/password values), I get the following error messages: enter image description here

enter image description here

I've followed the folowing Progress documentation for this example: Progress Documentation

When I try to run a GET through a REST test program like Insomnia, I get the proper result that I expect in JSON format. I basically want to to the same inside of OpenEdge.

Does anyone have an idea what's wrong here?

Continue reading...
 
Status
Not open for further replies.
Back
Top