> Instead, you'd have to pass in an intarweb request object instead of an > URI, and construct the Authorization header yourself.
Code:
(import (chicken base))
(import (chicken io))
(import http-client)
(import intarweb)
(import uri-common)
(define url "http://localhost:12345")
(define user "myuser")
(define pass "mypass")
(let* ((authorization-header `(authorization #(basic ((username . ,user)
(password .
,pass)))))
(request (make-request uri: (uri-reference url)
headers: (headers (list
authorization-header)))))
(with-input-from-request request #f read-string))
Request:
GET / HTTP/1.1
Authorization: Basic bXl1c2VyOm15cGFzcw==
Host: localhost:12345
User-Agent: http-client/1.2 (CHICKEN Scheme HTTP-client)
signature.asc
Description: PGP signature
