chickadee » intarweb » response-has-message-body-for-request?

response-has-message-body-for-request? #!optional predicateparameter

This parameter holds a predicate which accepts two arguments: a response object and a request object. It returns #t when the response will have a message body for the given request. By default in HTTP/1.1, this is not the case for responses with a response-code of 204 and 304 or in the 1xx class, nor for HEAD requests. All other responses will have a message body.

The parameter is useful for deciding in clients whether a message body will follow (otherwise, trying to read will probably result in an error or in case of HTTP pipelining in a synchronisation problem)