Read-Http-Request

(read-http-request port) -> http-request

Pulls a string from the given port and converts it to an <http-request>.

The following, taken from test/http.ms, will be used as the basis for all http-request examples:

(define req1
 "GET /index.html HTTP/1.1\r\nHost: localhost:80\r\nAccept: */*\r\n\r\n")
  :: "GET /index.html HTTP/1.1
Host: localhost:80
Accept: */*

"
>> (define reqp (make-channel))
:: [channel 56CB80]
>> (send req1 reqp)
:: null
>> (define req (read-http-request reqp))
:: [http-request [vector "GET" [dict ... ...] [http-url ...] "HTTP/1.1" #f #f
[channel 56CB80]]]