statusMayHaveBody function

bool statusMayHaveBody(
  1. int status
)

Whether a response with status carries a body on the wire. 1xx, 204 and 304 responses have none, and no Content-Length either.

Implementation

bool statusMayHaveBody(int status) =>
    status >= 200 && status != 204 && status != 304;