Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (14 sloc) 0.459 kb
#lang racket/base
(require
rackunit
"protocol.ss")
(define (request-bytes method server resource)
(let ([bytes (open-output-bytes)])
(write-request method server resource bytes)
(get-output-bytes bytes)))
(define/provide-test-suite protocol-tests
(test-case
"Standard request line written correctly"
(check-equal?
(request-bytes #"GET" #"www.untyped.com" #"/index.html")
#"GET /index.html HTTP/1.1\r\nHost: www.untyped.com")))
Jump to Line
Something went wrong with that request. Please try again.