[Haskell-cafe] Web API attempt: Thrift + Evernote API -- apparent brick wall: HTTPS support

Ryan Newton rrnewton at gmail.com
Sun Oct 23 17:26:21 CEST 2011

Hi all,

An old fogey here -- new to this world of web APIs / rpc over HTTP.  I was
thinking that since Thrift supports Haskell that it wouldn't be to hard to
plug my Haskell program into the Thrift-based Evernote API to upload notes
to the cloud.  The first step to do that would be to authenticate:


Uh, oh!  Trouble already.  You must use THttpClient to connect using HTTPS!
 It looks like the Thrift library for Haskell doesn't offer that option
(plain HttpClient only).  Presumably because the package HTTP doesn't
support https?


Is there a way that libcurl could be used to provide THttpClient?  I don't
know enough to say...

More generally, my problem is that it hard to figure out how to use Thrift
from Haskell.  Simple examples like this are helpful:


But the Thrift library itself lacks full Haddock documentation:


And the generated Thrift code doesn't restrict its export lists to give you
a hint as to what the "entry points" are.  This is not to blame the thrift
authors.  They have N languages to support!
   But for someone with some extra time from the Haskell community, it seems
like there would be some good return-on-investment for effort spent cleaning
up the Haskell Thrift support.  Maybe this is what Christian Lavoie is
already doing? (http://hackage.haskell.org/package/thrift)


P.S. One final note in the language-interop department.  Since OCaml is
supported by SWIG, Haskell should be too!  Manuel's caveats notwithstanding:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111023/2abc0007/attachment.htm>

More information about the Haskell-Cafe mailing list