Nearly there added by LewisCowper on Wed Jan 14 15:47:54 2015

(require-extension http-client medea  uri-common)

;; Will get put in the user-agent header if non-#f...
(client-software '(("scheme-swapi" #f #f)))

;; Get all planets
(define (planets)
    (with-input-from-request "http://swapi.co/api/planets/" #f read-json))

;; Succeeds in getting data on tatooine
(define (tatooine)
    (with-input-from-request "http://swapi.co/api/planets/1" #f read-json))

;; Fails with unexpected object somewhere
(define (planet x)
  (let* ((update-uri (uri-reference "http://swapi.co/api/")
                      path: '("planets" x))
         (req (make-request
               method: 'Get
               uri: update-uri)))
    (with-input-from-request req #f read-json)))