chickadee » intarweb » make-request

(make-request #!key uri port (method 'GET) (major 1) (minor 1) (headers (headers '())))procedure

Create a request object (a defstruct-type record). The client will generally write requests, while the server will read them.

The URI defines the entity to retrieve on the server, which should be a uri-common-type URI object. The PORT is the scheme I/O port where the request is written to or read from. The METHOD is a symbol that defines the HTTP method to use (case sensitive). MAJOR and MINOR identify the major and minor version of HTTP to use. Currently, 0.9, 1.0 and 1.1 are supported. HTTP/0.9 support is disabled by default for security reasons (HTTP/0.9 has nothing to identify it as HTTP, which means it cannot be distinguished from any completely different service. This can cause HTML interpretation of, say, SMTP or FTP responses which might contain attacker-supplied data).

HEADERS must be a headers object. See below for more information about headers.