wisp

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 949ab9c5a1094dcba781e712a6672ea012becb67
parent bd852355946fe8cdb7dd1bb36e2fe760cd474bc0
Author: rsiddharth <s@ricketyspace.net>
Date:   Wed,  5 Jun 2019 19:34:25 -0400

hn -> hn/g

Diffstat:
hn | 23-----------------------
hn/g | 24++++++++++++++++++++++++
2 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/hn b/hn @@ -1,23 +0,0 @@ -#!/usr/bin/env racket -;; -;; SPDX-License-Identifier: ISC -;; -;; Copyright © 2019 rsiddharth <s@ricketyspace.net> -;; - -#lang racket/base - -(require net/http-client) -(require racket/port) -(require openssl) - -(define HOST "news.ycombinator.com") - -(define (fp) - "Fetch HN Front Page." - (let ((hc (http-conn-open HOST - #:ssl? (ssl-make-client-context 'secure) - #:port 443))) - (define-values (status headers port) - (http-conn-sendrecv! hc "/")) - (port->string port))) diff --git a/hn/g b/hn/g @@ -0,0 +1,24 @@ +#!/usr/bin/env racket +;; +;; SPDX-License-Identifier: ISC +;; +;; Copyright © 2019 rsiddharth <s@ricketyspace.net> +;; + +#lang racket/base + +(require net/http-client) +(require racket/port) +(require sxml/sxpath) +(require openssl) + +(define HOST "news.ycombinator.com") + +(define (fp) + "Fetch HN Front Page." + (let ((hc (http-conn-open HOST + #:ssl? (ssl-make-client-context 'secure) + #:port 443))) + (define-values (status headers port) + (http-conn-sendrecv! hc "/")) + (port->string port)))