Hi,
Some webpages return a 503 forbidden status when they do not recognise
the User-Agent from the HTTP request. To get around this in my own code,
I've provided a second exported send-request function like this:
(define (http:my-send-request req . more)
(let* ((in #f)
(out #f)
[req (if (string? req)
(http:make-request 'GET req (cons '("Connection" .
"close") more))
req)]
...)
And then provided a wrapper function in my client code like this:
(define (send-request-wrapper url)
(http:imo-send-request url
'("User-Agent" . "Mozilla/5.0")
'("Content-Type" .
"application/x-www-form-urlencoded")))
This seems to work, but is there a better way of doing this?
Cheers,
Ian
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users