cancel
Showing results for 
Search instead for 
Did you mean: 

http:get username password

Former Member
0 Kudos
2,489

I have a function to get data from a webservice. It seems to reach out for http, but for https it is throwing an error.

SET @CMD = STRING('https://username:password@website.com/jsoncmd?timeRange=11/06/2017%2000:05~11/06/2017%2000:09')

SET @RET = f_dans_web_client_function(@cmd)

error is The URI https://username:password@website.com/jsoncmd?timeRange=11/06/2017%2000:05~11/06/2017%2000:09 is invalid SQLCODE=-980, ODBC 3 State="HY000"

But I can do this http to other sites. And my URL works if I put it into a browser

Accepted Solutions (0)

Answers (2)

Answers (2)

VolkerBarth
Contributor

Your https call is missing a CERTIFICATE clause, cf. that question.

In contrast to your browser, SA web client functions need to explicitly specify the certificate of the according web server.

Former Member
0 Kudos

Here is the definition of the function:

ALTER FUNCTION "TM38"."f_dans_web_client_function"( in iScriptName varchar(500) ) 
returns long varchar
url '!iScriptName' type
'HTTP:GET'
justin_willey
Participant
0 Kudos

That function doesn't look complete

Former Member
0 Kudos

Well it does not for non HTTPS request, but seems to have trouble for SSL, not sure what else I need to do, thanks