Unable to make https calls using this client .
Closed this issue · 6 comments
The client seems to be using httpurlconnection to make the graph ql api calls . This restricts making calls to https .
Can you please provide the error message? httpurlconnection is still capable of making https calls, it is doing so in samples/kotlin-sample/src/main/kotlin/Main.kt
as well as samples/scala-sample/src/main/scala/Main.scala
when querying against the GitHub v4 open api.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
GraphQLException{message='null', status='null', description='sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target', errors=null}\n\tat io.aexp.nodes.graphql.Fetch.send(Fetch.java:84)\n\tat io.aexp.nodes.graphql.GraphQLTemplate.execute(GraphQLTemplate.java:83)\n\tat io.aexp.nodes.graphql.GraphQLTemplate.query(GraphQLTemplate.java:42)
Also is there a reason to use httpUrlConnection over httpsUrlConnection ?
I want to be abe to load a keystore file while opening the connection . If thhis client is used in a serverless app , then to be able to call a https which mandates a cert we would have to load it while opening the connection . I believe that is currently not possible .
Hi @bpillai, the reason I chose httpUrlConnection over httpsUrlConnection is because I wanted the library to support http as well as https (see this). Your error looks unrelated to this library and more of an issue with loading your keystore into the jvm. Loading your keystore can be done in many ways based on your application and how it is run, you can find many articles and posts on doing this each way. Closing this issue out.