[racket] What is a comparable rkt code for curl command with HTTP Auth?
Two things to do:
1. "base64-encode" produces a newline at the end, which you probably
want to remove somehow:
#lang racket/base
(require net/base64)
(base64-encode #"user:pwd")
;==> #"dXNlcjpwd2Q=\r\n"
(regexp-replace #rx#"[\r\n]+$" (base64-encode #"user:pwd") "")
;==> #"dXNlcjpwd2Q="
2. Your debugging will be much easier if you can see the actual protocol
between client and server. My favorite tool for this is Wireshark,
which is Free Software. Then you can compare the protocol of your
"curl" example with your Racket one.
--
http://www.neilvandyke.org/