robstewart57/hsparql

HTTPS not supported

Closed this issue · 8 comments

After querying Wikidata through its public SPARQL API (https://query.wikidata.org/sparql), I get the following error: user error (https not supported).

This library uses the HTTP library which does not support HTTPS.

@koslambrou can you provide a failing test case please?

I will fix this if I have a reproducible example, thanks.

@robstewart57 Just to clarify, you would like for me to create a failing test case in the tests directory for Wikidata ? Or copy-paste the failing code in the current issue ?

@koslambrou How about just copy-paste the failing code here in this issue. Thanks!

@robstewart57 Here's a code sample

import Database.HSparql.Connection
import Database.HSparql.QueryGenerator

main :: IO ()
main = do
  (Just s) <- selectQuery "https://query.wikidata.org/sparql" wdtQuery
  forM_ s print

wdtQuery :: Query SelectQuery
wdtQuery = do
  s <- var
  p <- var
  o <- var

  limit 10

  selectVars [s, p, o]

Here's the output:

myprogram-exe: user error (https not supported)

@koslambrou this should be fixed in 69e30ac

Let me know if it does not work for you.

@robstewart57 Has this change been released to hackage?

So when I install the package from hackage, it doesn't support https, I need to use the latest source to do that. So maybe release a 0.3.7 with this change?