[plt-scheme] Making HTTPS requests
--- Anton van Straaten <anton at appsolutions.com> wrote:
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> Is it possible to make an HTTPS request (notice the "S")
> using PLT? I see
> the openssl collection lurking amongst the other
> collections, but it looks
> like I'd have to hack url-unit.ss to make it use that.
url-unit imports a unit with the tcp^ signature.
ssl-tcp-unit.ss, in the net collection, provides an SSL
based unit that implements the sig.
So you simply need to hack url.ss. The code below ought to
work. Write it up in the Cookbook; be a hero :-)
Noel
------------
(module ssl-url mzscheme
(require (lib "unitsig.ss")
"url-sig.ss"
"url-unit.ss"
"tcp-sig.ss"
"ssl-tcp-unit.ss")
(provide-signature-elements net:url^)
(define-values/invoke-unit/sig
net:url^
(compound-unit/sig
(import)
(link
[T : net:tcp^ (make-ssl-tcp@)]
[U : net:url^ (url@ T)])
(export (open U)))))
=====
Email: noelwelsh <at> yahoo <dot> com
AIM: noelhwelsh
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com